Godders199
Active Member
- Joined
- Mar 2, 2017
- Messages
- 313
- Office Version
- 2013
Hi, i have been trying to get the following to run, but keeps erroring, effectively if value in range (x,25) is contained in Range "i;I") i want "NA Protection" in (X,18), othereise blank
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
For x = 2 To FinalRow
cells(X,18)= If (Application.WorksheetFunction.CountIfs(Worksheets("Non Advised").Range("I:I"), Worksheets("summary").Range(x, 25) > 0) Then Cells(x, 18).Value = "NA Protection" Else Cells(x, 18).Value = "")
Next x
Have put if at the start ,but it always highlighs u to "then" whatever i try.
Any ideas?
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
For x = 2 To FinalRow
cells(X,18)= If (Application.WorksheetFunction.CountIfs(Worksheets("Non Advised").Range("I:I"), Worksheets("summary").Range(x, 25) > 0) Then Cells(x, 18).Value = "NA Protection" Else Cells(x, 18).Value = "")
Next x
Have put if at the start ,but it always highlighs u to "then" whatever i try.
Any ideas?
Last edited: