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: 2
Default find within a named range, then deselect the range

I'm writing a macro to format column headers and adjust column widths.

The question i want to ask is, "how do I deselect the named range i
just searched within, keeping the cursor on the cell I found."

Essentially...
(the header row is a named range, "Headers")
1. Goto "Headers"
2. Find "HeaderTitle3" (this avoids finding instances elsewhere on the
sheet)
3. ...then i would like to:
a.) apply Bold for this cell only
b.) adjust the column width to "10"

Problem: at step 3, the named range "Headers" is still selected, and
all formatting applied affects everything within this range (all the
headers).

Is there a command i can use to de-select the named range, after i find
the cell within it i need?

One note: a problem i'm addressing is that rows and columns will be
added to this sheet. Therefore, if I name a cell "D2" in the script,
then add a column (C), then the reference is incorrect.
To de-select the range, I tried using the arrow keys to move up 1

cell, then down 1 cell, but in the recorded Macro, it simply named the
cell that was selected ( Range("D2").Select ) so that's not a solution.
Custom Views seems to use cell references as well; after inserting

a new column, then selecting a custom view, the formatting is applied
to the wrong columns (still applied to column D, after I insert a new
column C and push it over to become D)
I'd rather avoid naming the individual columns as named

ranges/cells, because i have almost 200 columns.

thx,
bob

 
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
Find in Named Range problem (2nd Try) G.R. New Users to Excel 2 February 27th 08 08:17 PM
Find Row in a named range Raul Excel Worksheet Functions 3 November 24th 07 12:41 AM
Find Cell in Named Range David Excel Worksheet Functions 3 May 8th 07 06:00 AM
VBA: find number of columns in named range? George[_3_] Excel Discussion (Misc queries) 3 April 30th 07 05:35 PM
How to find all formulas that used a certain named range Laurence Lombard Excel Discussion (Misc queries) 2 October 25th 05 08:15 AM


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

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"