PC Review


Reply
Thread Tools Rate Thread

Cell variable name

 
 
=?Utf-8?B?QlNJSQ==?=
Guest
Posts: n/a
 
      10th Jan 2007
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.
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      10th Jan 2007
As always, post YOUR coding efforts for comments and suggestions.

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"BSII" <(E-Mail Removed)> wrote in message
news:6CB0F57B-DAAC-442C-9DFC-(E-Mail Removed)...
>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.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering variable value in cell to right of 2nd variable CompleteNewb Microsoft Excel Discussion 3 23rd Sep 2007 07:53 PM
Sum a column using fixed start cell and variable end cell =?Utf-8?B?TmlnZWw=?= Microsoft Excel Programming 2 13th Jul 2007 07:40 AM
Running a variable macro when any value is entered into a variable cell IP Microsoft Excel Programming 3 14th Dec 2005 05:15 PM
Linking a cell to another workbook cell based on a variable name =?Utf-8?B?QnJpYW4=?= Microsoft Excel Misc 6 1st Jun 2005 11:54 PM
How to copy formatting when moving from cell to variable to another cell on another worksheet kls Microsoft Excel Programming 1 11th Sep 2004 10:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:00 AM.