OilEconomist
Active Member
- Joined
- Dec 26, 2016
- Messages
- 439
- Office Version
- 2019
- Platform
- Windows
Thanks in advance for anyone who is assisting. I will test any recommendations and will let you know the outcome.
Item:
I've found the last row in my data ("LastRow"), and now I'm trying to set a formula in cells A5 to "LastRow" to a formula, but I'm getting errors.
The First issue seems to be with the use of "A5:A"&"LastRow" in the code and then I'm also having issues with the formula as I've tested trying to use it by just setting "A5:A"&"LastRow" to "A5:A6".
Once again thanks in advance.
Item:
I've found the last row in my data ("LastRow"), and now I'm trying to set a formula in cells A5 to "LastRow" to a formula, but I'm getting errors.
The First issue seems to be with the use of "A5:A"&"LastRow" in the code and then I'm also having issues with the formula as I've tested trying to use it by just setting "A5:A"&"LastRow" to "A5:A6".
Once again thanks in advance.
Code:
ActiveSheet.Range("A5:A" & "LastRow").Formula = "=IF( OR(B5 = "", B4 = "Rem."), "Delete", IF( AND( N1 = "", LEFT( B1, 4) = "Date"), "Total", IF( AND( N1 <> "", LEFT( B1, 4) = "Date"), N1, IF(AND(B5 <> "", A4 = "delete"), B2, A4 ))))"