Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Named ranges global vs. local (Win XP, Office2003, Excel)

    Hi,

    Got a workbook with multiple input sheets.
    Some fields are common, some not. All of them can be located in various row numbers depending on required input.

    I think I read something way back on "Global vs. local names" but cannot locate it anymore.

    Initially I had one sheet, did 6 copies of it.
    Now I have the original names in all 7 sheets eg. "Report name" is a named cell present in all sheets, though at different locations (rows)

    Now on two of the sheets I would like to add a single field "Recommendation" - located in different cells (C23 and C25) in the two sheets

    From my already existing names this seems to be possible - but how is it done?
    Went through MS help - but that wasn't of much help. Suggestion didn't work. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Named ranges global vs. local (Win XP, Office2003, Excel)

    If you need to add a name local to a sheet, prefix the name with the sheetname and an exclamation mark: - i.e.:
    enter Sheet1!rangename
    for the name and then whatever reference you need in the RefersTo box.

    HTH.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Named ranges global vs. local (Win XP, Office2003, Excel)

    By default, names created in Insert | Name | Define... are global to the workbook, i.e. you can use them in any sheet.
    If you prefix the name with <code>'Sheetname'!</code>, it will be local to the specified sheet, i.e. the name can only be used in that sheet. You can have local names with the same name on different sheets, referring to different targets. So to define a name ReportName (spaces are not allowed in names) local to a sheet My Sheet, enter
    <code>
    'My Sheet'!ReportName
    </code>
    in the Names in workbook box in the Insert | Name | Define... dialog, or even in the box on the left hand side of the formula bar. If the sheet name doesn't contain spaces, you can omit the single quotes around the sheet name.

  4. #4
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Named ranges global vs. local (Win XP, Office2003, Excel)

    Hans and Rory,

    Thanks a Zillion, like always - your suggestion worked like a charm and you guys just saved me a lot of time.

    Big thanks,
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •