I am trying to get an Excel If formula to apply to all rows with content in a sheet. If the cell value entered after the macro is applied is y, then something appears in the next column, if it is n something else appears. It looks like this:
For Row = 2 To LastRow
Cells(Row, 8).Formula = "=IF(""H"" & Row & ""="" ""Y"",""Included"",IF(""H"" & Row & ""="" ""N"",""SYS"", """"))"
Next
I believe the issue is with where I putting the quotes and how many, but I can't figure that out for the life of me. I was able to get the formula to work when I chose a specific cell, ie. H2, but the issue began when I tried to use a variable.
Any help or tips or references would be appreciated!