Jul 21 2022 07:09 AM
Greetings,
I have a specific formula I want to enter into a cell:
Range("D1").Formula = "=SUM(IF(FREQUENCY(IF(B3:B" & lastrow & "<>"""",MATCH(B3:B" & lastrow & ",B3:B" & lastrow & ",0)),ROW(B3:B" & lastrow & ")-ROW(B3)+1),1))"
The goal of this formula is to count unique Order #s and display in cell D1.
After running the Macro the field comes back as "#Value". When I look at the formula it is updated to:
=SUM(IF(FREQUENCY(IF(@B3:B" & lastrow & "<>"""",MATCH(@B3:B" & lastrow & ",B3:B" & lastrow & ",0)),ROW(B3:B" & lastrow & ")-ROW(B3)+1),1))
If I manually remove the two @ symbols it returns the expected value.
If I can't turn off this new feature to automatically work with spills, how can i edit my VBA code to work correctly with it?
Thank you so much!
Jul 21 2022 08:03 AM