+ Reply to Thread
Results 1 to 5 of 5

Defined Names - choose which one to use

  1. #1
    Registered User
    Join Date
    09-29-2008
    Location
    London
    Posts
    14

    Defined Names - choose which one to use

    Hi all, this is my first post - I've had a lot of help from this forum by lurking but couldn't find an answer to my specific question!

    I'm working with spreadsheets of sales data, sorted by product. Each product is then split into quarters going back to Q1 2007 and has an array of clients and how much they paid us for each quarter. Each array has a defined name for each product (seven products total, so seven different workbooks, one for each product). Each workbook uses the same Name for each array, like this:

    fullQ207 will refer to the array containing the amount each client paid us in Q2 2007 for the product in question.

    I have a "main" workbook which pulls out the data for a specific client from each array using the MATCH/INDEX combination, and gives a sum for the past four quarters. So at the moment this is hard-coded to do Q3 2007 until Q2 2008. Obviously with Q3 2008 nearly over I will need to update this. I want to know if there is a way that for example I can type into 4 different cells the names I want to use and have Excel recognise that these cells are Names that I want it to use.

    So for example I will have in the cells fullQ107, fullQ207, fullq307, and fullq407 if I want to see the data for the entire of 2007. How can I make my MATCH/INDEX equations use the contents of these cells as a Name rather than a value, and so know which external arrays to look in?

    Hope that is clear enough but I will gladly clarify if required...

    Richard

  2. #2
    Forum Contributor
    Join Date
    11-23-2007
    Location
    Suffolk, UK
    Posts
    298
    hello Richard,

    I think what you are after is using INDIRECT within the formula, it allows you to "hardcode" a formula and references changable cells on a worksheet, have a look at the attached sheet, see if it is any good for what you need, if not then post an example.

    thanks reg
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-29-2008
    Location
    London
    Posts
    14
    Hi Reg, thanks for your help - that does look like it will do the trick.

    I had a look at the INDIRECT function and saw that if it references to another workbook it will return a #REF error if the referenced workbook is not open. I intend on having Defined Names in the cells in the main workbook which reference Defined Names (the arrays) in the referenced workbook, so I assume the referenced workbook will need to be open to do this? And if so is there any workaround??

  4. #4
    Forum Contributor
    Join Date
    11-23-2007
    Location
    Suffolk, UK
    Posts
    298
    hi Richard,

    I don't use closed workbooks for the stuff i do, but i have found a previous post that might help....

    HTML Code: 
    hopefully it may give you some insights in what you need.

    thanks reg

  5. #5
    Registered User
    Join Date
    09-29-2008
    Location
    London
    Posts
    14
    Great thanks for your help Reg!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Data Validation Defined Names
    By ChemistB in forum Excel General
    Replies: 4
    Last Post: 02-22-2008, 02:18 PM
  2. identify defined names in VBA code
    By Mike1001 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2008, 11:41 AM
  3. Duplicate Defined Names ?
    By dpenny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2007, 03:25 PM
  4. Updating Defined Names with Macro
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-10-2007, 11:34 AM
  5. Going insane!
    By kik in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 01-31-2007, 08:21 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1