Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column reference
Group,
I am stuck within a part of my code that looks at a static row but a dynamic Column. I am trying to make it so each time the macro runs it looks for that cell reference in a loop which is always located on persay the 5th row but column always changing. Anybody have any ideas to do this? Thanks in advance, Fish |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column reference
set rng = cells(5,256).End(xltoLeft)
rng.Select or for each cell in Range(cells(5,1),Cells(5,256).End(xltoLeft)) if cell.Value = "testString" then cell.Select exit for end if Next or set rng = Range(cells(5,1),Cells(5,256).End(xltoLeft)) set cell = rng.find("TestString") if not cell is nothing then cell.Select End if -- Regards, Tom Ogilvy "Fish" wrote in message ... Group, I am stuck within a part of my code that looks at a static row but a dynamic Column. I am trying to make it so each time the macro runs it looks for that cell reference in a loop which is always located on persay the 5th row but column always changing. Anybody have any ideas to do this? Thanks in advance, Fish |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - changing column reference based on value of other column | Excel Discussion (Misc queries) | |||
MS Excel - changing reference column value based on another column | Excel Discussion (Misc queries) | |||
Excel - changing column reference based on value of other column | Excel Discussion (Misc queries) | |||
Row reference increment but preserve column reference | Excel Worksheet Functions | |||
Macro to Reference Column Next to Current Reference | Excel Discussion (Misc queries) |