LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Cell variable name

I am writing a custom macro and have a very basic question... I want to
locate a certain cell by seraching for a specific word and then automatically
highlight a range of cells under or next to that cell. I can do this
manually by Searching for that keyword (which locates the cell in my
workbook) and then SHIFT+ARROWS to hightlight the adjacent cells. However,
when I try to automate this in a macro, it finds the cell ok, but then
records the hard values of the cell range rather than being referenced to the
cell that a searched for. The result is that the macro ends up finding the
same range rather than searching each workbook individually.

Any thoughts? If there was a way locate the keyword by the Search command
and then somehow copy the cell's address as a variable, I could probably work
out a formula from there, but I don't see a way to copy the cell's address.

Thank you for any help.
 
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
Running a variable macro when any value is entered into a variable cell [email protected] Excel Programming 3 December 14th 05 05:15 PM
Adding the same cell in different worksheets. Can that cell be variable? ro Excel Worksheet Functions 0 August 18th 05 06:31 AM
Linking a cell to another workbook cell based on a variable name Brian Excel Discussion (Misc queries) 6 June 1st 05 11:54 PM
set value of variable from cell Robert Excel Discussion (Misc queries) 0 February 25th 05 09:31 PM
How to copy formatting when moving from cell to variable to another cell on another worksheet kls[_2_] Excel Programming 1 September 11th 04 10:42 PM


All times are GMT +1. The time now is 01:26 AM.

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

About Us

"It's about Microsoft Excel"