+ Reply to Thread
Results 1 to 5 of 5

problems with using name of area and name of spreadsheet in formula

  1. #1
    Registered User
    Join Date
    10-15-2007
    Posts
    5

    problems with using name of area and name of spreadsheet in formula

    =INDEX(' Edu'!A:G,MATCH("X"&A2,' Edu'!H:H,0),5)can work
    =INDEX(pp,MATCH("X"&A2,pp,0),5) cannot work

    pp is the name of the range defined for Col A to G.
    Edu is the name of the spreadsheet but why is that using "pp" cant work in this case?what is the difference?
    Last edited by VBA Noob; 10-16-2007 at 03:35 AM.

  2. #2
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520
    Hi sowwy85,

    Is all the data in the same sheet?
    Corine

  3. #3
    Registered User
    Join Date
    10-15-2007
    Posts
    5

    Smile

    No its not in the same spreadsheet.

    I was trying to combine data from 1 spreadsheet to another spreadsheet.

    The name of one spreadsheet is named Edu and the other is named HR. I want to put the data in Edu into HR and the defined range of the data in Edu, i named it "pp". Hence, i need to insert data "pp" into the HR spreadsheet.

    My question hence is why does the formula which uses the name of the spreadsheet work but when i insert the name of the defined range into the formula, the formula does not work.

    =INDEX(' Edu'!A:G,MATCH("X"&A2,' Edu'!H:H,0),5)can work
    =INDEX(pp,MATCH("X"&A2,pp,0),5) cannot work

  4. #4
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    You state that range pp is defined as ' Edu'!A:G, but then you use pp to replace the range in your Match formula that was previously:

    MATCH("X"&A2,' Edu'!H:H,0)

    You see the problem? pp does not contain column H (and also Match needs a single column/row range (or array)).

    Maybe if you define pp to be:

    ' Edu'!A:H

    and then use the formula:

    =INDEX(pp,MATCH("X"&A2,INDEX(pp,0,8),0),5)

    Richard

  5. #5
    Registered User
    Join Date
    10-15-2007
    Posts
    5

    Smile

    thanks very much for helping to spot my mistake!

    CHEERS!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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