+ Reply to Thread
Results 1 to 5 of 5

Thread: Cant index data from a specific sheet if a cell has a specific value

  1. #1
    Registered User
    Join Date
    06-26-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    3

    Cant index data from a specific sheet if a cell has a specific value

    I am trying to make a spread sheet that will calculate costs depending on the size of an item but there is a specific machining charge that must be added. I have multiple sheets with different costs depending on the length (Z) of the item from 2" - 12". Each sheet has a machining charge depending on the x and y value. Ive attached a small test spreadsheet. I want to put in a value for X,Y and Z. The X and Y values index from a column and row but the Z value needs to specify which page it will come from. I've indexed the x,y values in a formula under grinding but I don't know how to get the Z value to change which sheet the formula will index from. If I put the number 2 in Z I want it to index x and y from the 2" sheet and if Z=2.5 then I want it to index x and y from the 2.5" sheet. I am also having it determine the cost by referencing a material type and a company abbreviation. The pricing formula is under formula in column A. If you need any specifics let me know. Thanks in advance.
    Attached Files Attached Files
    Last edited by ericheu; 06-28-2011 at 01:13 AM. Reason: Solved

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Cant index data from a specific sheet if a cell has a specific value

    You can use INDIRECT to refer to a sheet name....

    Try:

    =IF(A4=0,"",((A4+0.1)*(B4+0.1)*(C4+0.1)*INDEX('Company Name Abbr'!$C$3:$N$115,MATCH('Grinding Costs'!G4,'Company Name Abbr'!$B$3:$B$115,0),MATCH('Grinding Costs'!D4,'Company Name Abbr'!$C$1:$N$1,0))))+(INDEX(INDIRECT("'"&C4&CHAR(34)&"'!$B$2:$AA$27"),MATCH(B4,INDIRECT("'"&C4&CHAR(34)&"'!$B$1:$AA$1"),0),MATCH(A4,INDIRECT("'"&C4&CHAR(34)&"'!$A$1:$A$27"),0)))
    The above formula incorporates also the formula in A2 of the Formula tab!
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    06-26-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Cant index data from a specific sheet if a cell has a specific value

    I have one more thing that I can't get to work. If the number is not an exact match i can't get it to move up to the next closest number above it in the price sheet. I changed the 0 to a -1 at the end of the match(indirect line but it is not recognizing that command. I didn't think of that when I originally posted. Thanks again

  4. #4
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Cant index data from a specific sheet if a cell has a specific value

    Perhaps?

    =IF(A4=0,"",((A4+0.1)*(B4+0.1)*(C4+0.1)*INDEX('Company Name Abbr'!$C$3:$N$115,MATCH('Grinding Costs'!G4,'Company Name Abbr'!$B$3:$B$115,0),MATCH('Grinding Costs'!D4,'Company Name Abbr'!$C$1:$N$1,0))))+(INDEX(INDIRECT("'"&C4&CHAR(34)&"'!$B$2:$AA$27"),MATCH(TRUE,INDEX(INDIRECT("'"&C4&CHAR(34)&"'!$A$1:$A$27")>=A4,0),0),MATCH(TRUE,INDEX(INDIRECT("'"&C4&CHAR(34)&"'!$B$1:$AA$1")>=B4,0))))
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    06-26-2011
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Cant index data from a specific sheet if a cell has a specific value

    That was absolutely perfect!!!!! Thank you very much for your help. You actually reduced the time it takes for me to quote by 75%.

+ 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.2.0