![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 09:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com