Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just my opinion, but you are headed down a deadend street. What happends if
you want to loop from W to AF? You don't need to get letters involved at all and **nobody** does it that way. Public Sub test() Dim i As Long Dim c As Long For i = 19 To 21 If ThisWorkbook.Worksheets("Blad1").Cells(i, 1) = True Then For c = 8 To 11 destWB.Worksheets("Blad1").Cells(Lr, c) = "X" Next c End If Next End Sub -- Regards, Tom Ogilvy "JCanyoneer" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Columns now numbers rather than letters how do i get letters back | Excel Discussion (Misc queries) | |||
looping across columns in range? | Excel Discussion (Misc queries) | |||
Looping through columns | Excel Programming | |||
Looping thru columns beyond Z | Excel Programming | |||
Looping question for 2 columns | Excel Programming |