View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JCanyoneer JCanyoneer is offline
external usenet poster
 
Posts: 56
Default Looping letters (or columns)

That should do it! Things are pretty easy when you know the code to use. CHR
is new to me. Thanks!

"Fredrik Wahlgren" wrote:


"JCanyoneer" wrote in message
...
Yes, I think this code will loop my the range in the if statement. I need

to
be able to loop the Column or letter(H, I, J, K) in range from the destWB
line.
Does that help clear anything up?


I hope so. Here's my second suggestion

Public Sub test()
Dim i As Long
Dim c As Long

For i = 19 To 21
If ThisWorkbook.Worksheets("Blad1").Range("A" & CStr(i)) = True Then
For c = 72 To 75
destWB.Worksheets("Blad1").Range(Chr(c) & Lr) = "X"
Next c
End If
Next
End Sub

/Fredrik