Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Named Range Macro Formula

Try:

Worksheets("Sheet1").Range("SALES").Address
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Simon" wrote:

Hi There,

How do you get the cell references of a named range. I need to create a
formula within a macro which will be assigned to a particular cell, however
I'm having trouble doing this. I need the cell references of the particular
named range. The named range is only one cell eg. SALES is A5.

Thanks
Simon

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Named Range Macro Formula

Hi Martin,

That snippet of code didn't work I got the following error:

Object doesn't support this property or method.

Please help....
Thanks.
Simon

"Martin Fishlock" wrote:

Try:

Worksheets("Sheet1").Range("SALES").Address
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Simon" wrote:

Hi There,

How do you get the cell references of a named range. I need to create a
formula within a macro which will be assigned to a particular cell, however
I'm having trouble doing this. I need the cell references of the particular
named range. The named range is only one cell eg. SALES is A5.

Thanks
Simon

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Named Range Macro Formula

demo's from the immediate window:

? Application.Range("Sales").Address
$A$5

Range("B11").Formula = "=Sum(" & Application.Range("Sales").Address & ")"

? Range("B11").Formula
=SUM($A$5)


--
Regards,
Tom Ogilvy


"Simon" wrote in message
...
Hi Martin,

That snippet of code didn't work I got the following error:

Object doesn't support this property or method.

Please help....
Thanks.
Simon

"Martin Fishlock" wrote:

Try:

Worksheets("Sheet1").Range("SALES").Address
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Simon" wrote:

Hi There,

How do you get the cell references of a named range. I need to create
a
formula within a macro which will be assigned to a particular cell,
however
I'm having trouble doing this. I need the cell references of the
particular
named range. The named range is only one cell eg. SALES is A5.

Thanks
Simon



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
Named Range Macro Lost Excel Discussion (Misc queries) 1 September 22nd 09 11:17 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
Named Range Macro Formula Gary Keramidas Excel Programming 0 December 21st 06 11:36 PM
How do I use a Macro to define a Named Range EKUFan Excel Programming 1 September 16th 06 05:15 PM
How to set named range in macro? davegb Excel Programming 12 February 8th 06 02:46 PM


All times are GMT +1. The time now is 09:06 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"