Cannot validate against a string variable

  • Thread starter Thread starter aczocher
  • Start date Start date
A

aczocher

Hello-

I am trying to validate a string variable to see whether I need to copy
and paste to another sheet, but I am not getting anywhere. I tried
using Range and Cells, to no avail. Any ideas?

For i = 3 To 350
Sheets(strType).Activate

If Cells(i, 9).Value = strArea Then

Sheets(strType).Range("A" & i & ":AQ" & i).Copy
Sheets("Results").Activate
Sheets("Results").Range("A" & i).Select
Sheets("Results").Paste

End If
Next i

End Sub
 
hi,

I am trying to validate a string variable to see whether I need to copy
and paste to another sheet, but I am not getting anywhere. I tried
using Range and Cells, to no avail. Any ideas?
If Cells(i, 9).Value = strArea Then
Try using .FormulaR1C1 instead of .Value.


mfG
--> stefan <--
 
Back
Top