Hi
I'm not sure where I'm going wrong.
The formula that I'm using is below:
I'm trying to populate this via VBA as below:
Formula is as Array formula (the usual Ctrl+Shift+Enter if you do it manually).
Quick brief of what the formula does.
The RED section below simply checks range AI4:AM4 to see if more than one cell is non-blank, if this is the case it will populate value "confl.", if this conditionn does not exist then the BLUE section checks the range AI4:AM4 and retrieves the value of firts non-blank cell.
Now when I'm trying to use VBA to populate this formula in range AO4:AO(last row as per column AH), it populates in a way that the row numbers are not dynamic and they are fixed for row 4.
e.g. instead populating:
It populates the formula with static row 4
e.g.
I have attached a spreadsheet (Sheet "Tracker") with the VBA in question together with with macro button. I have also added sheet "Manual example" that has the formula there to see it working properly. Note that on the code I have disabled the line that removes the formulas and keeps the vales. This is just you can see the mactro getting the formula wrong.
I would appreciate any help to get this right.
Cheers
Bookmarks