+ Reply to Thread
Results 1 to 19 of 19

Need some help with Index/match formula

  1. #1
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Need some help with Index/match formula

    Results in sheet "JBS" B4. The data is in "workings" sheet and we need to match / Lookup the following. terminal (B1), Month (B2), Throughput column (B3) - by material (A4:A15)
    I'm attaching excel workbook

    Many thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need some help with Index/match formula

    Hi,

    Your workbook could really use some lookup tables and helper columns. You could use a formula like this in B4
    =SUMIFS(INDEX(Workings!$E:$I,,MATCH(JBS!$B$2&JBS!B$3,Workings!$E$1:$I$1&Workings!$E$2:$I$2,0)),Workings!$B:$B,$B$1,Workings!$D:$D,$A4)
    which needs to be array entered using Ctrl+Shift+Enter and then filled down and across. If you have more months, you will need to expand the ranges and you also need to be sure that on the Workings tab the month/year is repeated for every column.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need some help with Index/match formula

    Hi Don, thank you. Getting a #VALUE when dropping the formula in B4:-( what do I do wrong?
    Also you comment "Your workbook could really use some lookup tables and helper columns", I agree it would be better to do some form of lookup but have no idea of how to do this hence the straight "= copy". would appreciate you provide some guidance pls?

    Thank you

    Ralph

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    Romar, welkom aan die forum, hoe gaan dit daar in die Kaap?
    SA ex-pat PE old boy from klerksdorp, now living in USA (son works in CT)

    Maybe Im missing something here, but your references dont seem to match your file?
    terminal (B1), Month (B2), Throughput column (B3) - by material (A4:A15)
    Where (exactly) is the data you are referencing, and where (exactly) do you want the answer/s? If necessary, provide some sample answers, too.

    As far as setting up a small lookup table, it would look something like this....
    A
    B
    1
    95 Octane ULP Unleaded - 95
    2
    95 Octane ULP with Techron Unleaded - 95
    3
    95 Octane LRP with Techron Lead Replacement - 95
    4
    95 Octane LRP Lead Replacement - 95
    5
    Marine Distillate Fuel Marine Fuel

    Where the data is in the 1st column, and what you want returned, is in the 2nd column
    Then a simple VLOOKUP will pull back what you want.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need some help with Index/match formula

    Hello Ford - small world, right? Lekker innie Kaap net nie baie water nie!
    okay let me try again as the formula provided by Don looks fine for someone who is not an expert at all
    let me try to be more simple - and the data is in the "working" sheet

    In JBS B4 we would like to see the Throughput volume 5 479 346 against material Marine fuel for Terminal JBS - in other words the sum of all volumes for material 1 but in this case it is only a one liner against material 1 Marine fuel
    Marine Fuel 5 479 346
    Marine Fuel
    Marine Fuel


    Similarly In JBS C4 we would like to see a sum of the loss/Gains which is in column F in the workings sheet
    Marine Fuel 21 572
    Marine Fuel -20 226

    Fuel Oil 28 164
    Fuel Oil -40 798

    Hope this helps

    Cheers - Ralph vannie Kaap

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    Yes, you guys are having a rough time with the drought there

    I put this in B11 and copied down and across...
    =SUMIFS(Workings!E:E,Workings!$D:$D,JBS!$A11,Workings!$B:$B,JBS!$B$1)

  7. #7
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need some help with Index/match formula

    Not getting a result:-( - Please can you attach the excel file or I can send mine again?

    also pls remember the formula must also look at the month and not the Terminal name only

    Thank you

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    Yes, I get that it needs to look at the month, but I figured we would start simple (hard-code the month column) and work up from there

    When you say its not working, wrong answer? no answer? something else?

  9. #9
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need some help with Index/match formula

    Sorry what I meant by not getting a result - it returned a 0 value
    okay I understand, lets start simple and work our way through to Feb as well

    Tx
    Ralph

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    THis uis what I got, using that formula, conpared to your examples...
    A
    B
    C
    3
    Throughput
    Loss/Gains
    4
    Unleaded - 95
    5
    Unleaded - 93
    1,000,000
    105
    6
    Lead Replacement - 95
    7
    Lead Replacement - 93
    8
    Diesel 50
    9
    Diesel 500
    10
    IK
    11
    Marine Fuel
    (5,479,346)
    1,345
    12
    Fuel Oil
    -
    (12,634)
    13
    HFO
    14
    Jet

  11. #11
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need some help with Index/match formula

    sorry have to run off to meeting quick - attaching my workbook
    talk a little later
    Attached Files Attached Files

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    Bed time here too, will pick up again tomorrow

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    OK just had a quick look at your 2nd file - you have a space after JBS in B1

  14. #14
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need some help with Index/match formula

    Thank you - got it
    Can we now try and look for the month as well?

    Tx Ralph
    Attached Files Attached Files

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    Try this for K10...
    =SUMIFS(INDEX(Workings!$E$3:$I$1000,0,MATCH($B$2,Workings!$E$1:$I$1,0)+COLUMNS($A$1:A$1)-1),Workings!$D$3:$D$1000,$A11,Workings!$B$3:$B$1000,$B$1)
    copy down and across as needed.

  16. #16
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need some help with Index/match formula

    It works! Thanking you
    I must just still work out how best to lookup from sheet table into workings sheet:-(

  17. #17
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    What do you mean by that?

  18. #18
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: Need some help with Index/match formula

    it is okay thanks Ford

  19. #19
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need some help with Index/match formula

    Jy is welkom

+ 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. Replies: 4
    Last Post: 04-14-2017, 07:47 PM
  2. Index Match formula changing my Index daily
    By vitt4300 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-31-2017, 02:19 PM
  3. [SOLVED] This formula works but I donīt understand why Index(Index) match
    By campelliann in forum Excel General
    Replies: 2
    Last Post: 01-25-2016, 05:55 PM
  4. Index Match Match Formula DOESN'T WORK WITH TABLES/TABLE NAMES ??
    By Underling in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-04-2014, 09:01 PM
  5. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  6. Index Match Index Formula work slow
    By avk in forum Excel General
    Replies: 9
    Last Post: 03-07-2012, 02:19 PM
  7. Replies: 5
    Last Post: 02-29-2012, 08:51 PM

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