Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - changing column reference based on value of other column Dharmesh Patel Excel Discussion (Misc queries) 4 October 12th 09 02:41 PM
MS Excel - changing reference column value based on another column Dharmesh Patel[_2_] Excel Discussion (Misc queries) 2 October 12th 09 01:19 PM
Excel - changing column reference based on value of other column Dharmesh Patel Excel Discussion (Misc queries) 2 October 12th 09 01:18 PM
Row reference increment but preserve column reference Pwanda Excel Worksheet Functions 1 April 28th 05 01:12 PM
Macro to Reference Column Next to Current Reference dolphinv4 Excel Discussion (Misc queries) 2 April 11th 05 08:36 AM


All times are GMT +1. The time now is 09:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"