+ Reply to Thread
Results 1 to 8 of 8

Indexing formula with multiple sheets

  1. #1
    Registered User
    Join Date
    05-19-2015
    Location
    Boulder, Colorado
    MS-Off Ver
    2016
    Posts
    45

    Indexing formula with multiple sheets

    So I'm having an issue pulling data from two sheets that have the same headings into a master sheet where all the data should be kept. The "Initial Invoices" sheet and "Secondary Invoices" are the sheets where the data should be pulled from. I understand how to use an index array formula to pull data from another sheet in excel but I'm having trouble when I need to pull the data from two sheets into one giant sheet which will ultimately contain every invoice.

    Here's the formula I'm attempting and having trouble with...It's clearly wrong as you'll see the results are adding whats being reported for "Table2" to whats being reported in "table3" but its how I imagined the formula should work. Hopefully you'll understand what I'm referring to as you see the sample file.

    =IFERROR(INDEX(Table2+Table3[#Data],SMALL(IF((Table2[PO '#]<>"")+(Table3[PO '#]<>""),ROW(Table2[PO '#])-MIN(ROW(Table2[PO '#]))+1,""),ROWS($1:2)), MATCH(A$1,'Initial Invoices'!$A$1:$D$1,0)),"")

    So as youll see in the "master invoices" sheet, the formula is only reporting 9 rows of data when it should be reporting all 14 distinct PO #'s. (9 from Table2 and 5 from Table3) Instead of adding the two numbers together.

    Thank you in advance for your help
    Mike Stafford
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Indexing formula with multiple sheets

    Hello
    Take a look at the attached reply. Does this do as required?

    DBY
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-19-2015
    Location
    Boulder, Colorado
    MS-Off Ver
    2016
    Posts
    45

    Re: Indexing formula with multiple sheets

    Yes that's what I'm looking for, I should have included another sheet because my actual excel file is referencing three sheets instead of two like the sample shows. Is there a formula that will pull data from three sheets? I tried inputting another Index command after the second in the formula you wrote but it returns nothing at all when I do so.

    This is how mine looks:
    =IFERROR(IF(ROWS(B$2:B2)<=COUNTA(Table2[PO Date]),INDEX(Table2[PO '#],ROWS(B$2:B2)),INDEX(Table3[PO '#],ROWS(B$2:B2),INDEX(Table4[PO '#],ROWS(B$2:B2)-COUNTA(Table2[PO Date]))),"")

    Thankyou

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Indexing formula with multiple sheets

    why not add all data on 1 sheet instead of several sheets.

    Then you can easy analyse the data (with a pivot table).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    05-19-2015
    Location
    Boulder, Colorado
    MS-Off Ver
    2016
    Posts
    45

    Re: Indexing formula with multiple sheets

    Because those sheets are pulling data from another sheet that includes a unique payment term, each sheet represents when the invoice will be documented. The first sheet inputs data when the "PO date" column is filled out in my PO log, the second and third sheets input it after the product is shipped off but i want to keep sheets 2 and 3 separate because the order might involve 3 payment invoices, therefore the terms are applied to each individual invoice and should be separated as such but I want to have a master invoice sheet that documents every invoice on one sheet. Hope that explains it.

    Thank you all for the help
    Last edited by MikeSta4ord; 07-21-2015 at 09:19 PM.

  6. #6
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Indexing formula with multiple sheets

    Hello
    I've amended the formula for three tables. I've used an helper table and column to make things easier but you could incorporate these calculations into the formula. It seems to work OK but you'll perhaps need to test this out on some real data, I suggest a copy not your actual file.

    DBY
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-19-2015
    Location
    Boulder, Colorado
    MS-Off Ver
    2016
    Posts
    45

    Re: Indexing formula with multiple sheets

    Thank you very much DBY.

    You truly are an excel wizard. I'm very grateful for your presence. The formula is working flawlessly with my data set.
    Last edited by MikeSta4ord; 07-22-2015 at 12:00 PM.

  8. #8
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Indexing formula with multiple sheets

    Happy to have helped. It was a bit of a logic puzzle.

+ 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. Indexing and matching cells across two sheets
    By Rebecca Gillon in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-27-2013, 11:18 AM
  2. [SOLVED] Multiple indexing arrays?
    By sperrysperry in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 12-16-2013, 01:16 AM
  3. [SOLVED] Indexing multiple arrays
    By Kybynn in forum Excel General
    Replies: 6
    Last Post: 05-28-2012, 10:32 PM
  4. [SOLVED] Matching and Indexing Multiple Columns
    By tim220225 in forum Excel General
    Replies: 10
    Last Post: 03-29-2012, 07:26 AM
  5. Replies: 4
    Last Post: 12-06-2011, 03:01 PM
  6. Adding multiple match indexing
    By jb2235 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2011, 02:20 AM
  7. Indexing Multiple Tables
    By Haywire79 in forum Excel General
    Replies: 6
    Last Post: 08-13-2010, 02:12 AM
  8. Skip sheets while indexing
    By Melinda Chase in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2006, 03:55 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