Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default select the contents of a cell

Hi to All,

I have a macro to sort a table which produces a variable array that I
also want the macro to format. Alongside this array I have a formula
in cell R5 which produces a self-updating text string identifying the
array to be formatted. For example, after sorting, cell R5 contents =
"C7:M15" (the variable array). The result of the formula in R5 will
change each time the macro is run so that it always defines the
dimensions of variable array that I want to format.

How can I get the macro to select the contents of cell R5 as the array
to be operated on? I've found heaps of examples of how a macro can
write to a cell but nothing on how a macro can read from a cell . . .

Thanks if you can help and please don't assume I know a-n-y-t-h-i-n-g

Cheers,
RonW.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default select the contents of a cell


Like this:

range([r5].value).select



Col :

--
colofnatur
-----------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...fo&userid=3435
View this thread: http://www.excelforum.com/showthread.php?threadid=54543

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default select the contents of a cell

With Range(Range("R5").Value)
.Font.Name = "Arial"
.Interior.ColorIndex = 5
.NumberFormat = "#,##0.00"
End with
as an example.

or
With Range(Cells(5,"R").Value)

End with

set rng = Range(Cells(5,"R").value)

Just as a side note usually using notation like [R5] is much slower than
using the above form of referencing
--
Regards,
Tom Ogilvy

"Worldman1" wrote:

Hi to All,

I have a macro to sort a table which produces a variable array that I
also want the macro to format. Alongside this array I have a formula
in cell R5 which produces a self-updating text string identifying the
array to be formatted. For example, after sorting, cell R5 contents =
"C7:M15" (the variable array). The result of the formula in R5 will
change each time the macro is run so that it always defines the
dimensions of variable array that I want to format.

How can I get the macro to select the contents of cell R5 as the array
to be operated on? I've found heaps of examples of how a macro can
write to a cell but nothing on how a macro can read from a cell . . .

Thanks if you can help and please don't assume I know a-n-y-t-h-i-n-g

Cheers,
RonW.


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
how to select a Row based on contents of a Cell swintronix Excel Programming 8 January 5th 06 11:52 PM
How do I select & use contents of first non-blank cell in row? plf100 Excel Worksheet Functions 9 November 15th 05 12:16 PM
select cell at random and delete contents JJ[_8_] Excel Programming 2 September 1st 05 11:45 PM
select contents of cell dlh[_3_] Excel Programming 2 August 29th 05 03:43 AM
select a cell based on A1 contents Bill Kuunders Excel Programming 2 August 24th 05 11:23 PM


All times are GMT +1. The time now is 03:55 AM.

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"