Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Question about named area

HI, I have created several named areas in an Excel SpreadSheet, my cuestion
is, in VBA programming how can I make reference to these diferent areas in a
dinamic way.

Let say I have a worksheet whith several concepts repeated several times,
each concept is a named area. example

Salary 1500
Groceries 200
movies 30
Groceries 50

my question is how can I in VBA read Salary and add 1500 to the named area
Salary, and after Groceries, movies, etc.

If somebody can help me I would appreciated.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Question about named area

set r = cells(rows.count,1).End(xlup)(2)
r.value = "Groceries"
r.offset(0,1).Value = 1500

or another interpretation:

set r = cells(rows.count,1).End(xlup)(2)
r.value = "Groceries"
r.offset(0,1).Value = application.sumif(Range(Cells(1,1), _
rng),"Groceries",Range(cells(1,1),rng).offset(0,1) ) + 1500

--
Regards,
Tom Ogilvy


"Orlando" wrote:

HI, I have created several named areas in an Excel SpreadSheet, my cuestion
is, in VBA programming how can I make reference to these diferent areas in a
dinamic way.

Let say I have a worksheet whith several concepts repeated several times,
each concept is a named area. example

Salary 1500
Groceries 200
movies 30
Groceries 50

my question is how can I in VBA read Salary and add 1500 to the named area
Salary, and after Groceries, movies, etc.

If somebody can help me I would appreciated.

Thanks

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
copy contents of a named range to a section on working area Steve Excel Discussion (Misc queries) 1 May 22nd 09 10:36 PM
Excel2000:How to link Print Area with a named range Arvi Laanemets Excel Discussion (Misc queries) 5 April 8th 08 02:35 PM
Excel2000:How to link Print Area with a named range Arvi Laanemets Excel Worksheet Functions 5 April 8th 08 02:35 PM
How to reference a named area Orlando Excel Programming 2 August 3rd 07 04:56 AM
Fill a combo box from a named area on a sheet Phil Walker Excel Programming 1 August 10th 03 05:54 PM


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

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"