SOLVED

Iferror and vlookup in a formula to combine data from multiple sheets into a one sheet

%3CLINGO-SUB%20id%3D%22lingo-sub-1845446%22%20slang%3D%22en-US%22%3EIferror%20and%20vlookup%20in%20a%20formula%20to%20combine%20data%20from%20multiple%20sheets%20into%20a%20one%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845446%22%20slang%3D%22en-US%22%3E%3CP%3EI%20notice%20that%20my%20formula%20is%20only%20check%20one%20sheet%20retrieve%20the%20data%20and%20stop.%20It%20does%20not%20check%20the%20other%20sheets%20and%20pull%20that%20data%20to%20added%20to%20one%20sheet.%20For%20example%2C%20looking%20up%20item%20that%20is%20on%20two%20sheets%20but%20only%20data%20from%20one%20sheet%20is%20inputted%20on%20the%20master%20sheet.%20My%20formula%20is%3A%26nbsp%3B%3DIFERROR(VLOOKUP(%24A10%2C'Departure%20Billed'!%24A%246%3A%24J%242640%2C5%2CTRUE)%2CIFERROR(VLOOKUP(%24A10%2C'Non%20Signatory%20Billed'!%24A%244%3A%24J%2442%2C5%2CTRUE)%2CIFERROR(VLOOKUP(%24A10%2C'Customs%20Billed'!%24A%246%3A%24J%24239%2C5%2CTRUE)%2C)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%203%20sheets%3A%20Departure%20Billed%2C%20Non-Signatory%20Billed%2C%20and%20Customs%20Billed.%20Data%20my%20be%20on%20all%203%20sheets%20.%20I%20need%20to%20retrieve%20the%20data%20and%20sum%20up%20to%20others%20with%20the%20same%20item%20name.%26nbsp%3B%20Is%20my%20formula%20correct%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1845446%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1845563%22%20slang%3D%22en-US%22%3ERe%3A%20Iferror%20and%20vlookup%20in%20a%20formula%20to%20combine%20data%20from%20multiple%20sheets%20into%20a%20one%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845563%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F854829%22%20target%3D%22_blank%22%3E%40tonyan%3C%2FA%3E%26nbsp%3Bin%20your%20formula%20you%20have%20%22TRUE%22%20for%20range%20lookup%20parameter%20which%20is%20doing%20an%20approximate%20match%2C%20which%20probably%20means%20you%20are%20always%20getting%20a%20match%20to%20something%20in%20the%20first%20sheet.%26nbsp%3B%20what%20happens%20if%20you%20use%20%22FALSE%22%20in%20each%20case%20meaning%20exact%20match%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1845577%22%20slang%3D%22en-US%22%3ERe%3A%20Iferror%20and%20vlookup%20in%20a%20formula%20to%20combine%20data%20from%20multiple%20sheets%20into%20a%20one%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845577%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F854829%22%20target%3D%22_blank%22%3E%40tonyan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWill%20you%20share%20the%20files%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1845581%22%20slang%3D%22en-US%22%3ERE%3A%20Iferror%20and%20vlookup%20in%20a%20formula%20to%20combine%20data%20from%20multiple%20sheets%20into%20a%20one%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845581%22%20slang%3D%22en-US%22%3EI%20am%20not%20able%20to%20share%20sheet%20due%20to%20company%20policy.%20Are%20you%20still%20able%20to%20help%20me%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1845612%22%20slang%3D%22en-US%22%3ERe%3A%20Iferror%20and%20vlookup%20in%20a%20formula%20to%20combine%20data%20from%20multiple%20sheets%20into%20a%20one%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845612%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%20%26nbsp%3B%20I%20need%20the%20formula%20to%20check%20each%20sheet%20even%20if%20it%20finds%20data%20in%20the%20previous%20sheet.%26nbsp%3B%20add%20the%20numbers%20together.%26nbsp%3B%20Is%20there%20a%20formula%20that%20will%20do%20that%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I notice that my formula is only check one sheet retrieve the data and stop. It does not check the other sheets and pull that data to added to one sheet. For example, looking up item that is on two sheets but only data from one sheet is inputted on the master sheet. My formula is: =IFERROR(VLOOKUP($A10,'Departure Billed'!$A$6:$J$2640,5,TRUE),IFERROR(VLOOKUP($A10,'Non Signatory Billed'!$A$4:$J$42,5,TRUE),IFERROR(VLOOKUP($A10,'Customs Billed'!$A$6:$J$239,5,TRUE),)))

 

I have 3 sheets: Departure Billed, Non-Signatory Billed, and Customs Billed. Data my be on all 3 sheets . I need to retrieve the data and sum up to others with the same item name.  Is my formula correct?

10 Replies

@tonyan in your formula you have "TRUE" for range lookup parameter which is doing an approximate match, which probably means you are always getting a match to something in the first sheet.  what happens if you use "FALSE" in each case meaning exact match?

I am not able to share sheet due to company policy. Are you still able to help me?

@mtarler   I need the formula to check each sheet even if it finds data in the previous sheet.  add the numbers together.  Is there a formula that will do that?

@tonyan sorry didn't catch that sum up part.  You want to use SUMIF, SUMIFS or SUMPRODUCT functions.  Try this:

 

=SUMIFS('Departure Billed'!$E:$E,'Departure Billed'!$A:$A,$A10) + SUMIFS('Non Signatory Billed'!$E:$E,'Non Signatory Billed'!$A:$A,$A10) + SUMIFS('Customs Billed'!$E:$E,'Customs Billed'!$A:$A,$A10)

 

I changed the ranges to be the entire column E but change back if you need to restrict that range.

 

@tonyan  In your sample sheet I used a combination of absolute and relative ranges so you can easily fill down and fill right to fill the whole table.  NOTE that creating a pivot table or using power query may have advantages instead of creating a table of equations.  But for now here is the equation for your sample sheet:

=SUMIFS(Customs!C:C,Customs!$A:$A,$A3)+SUMIFS(Signatory!C:C,Customs!$A:$A,$A3)+SUMIFS(Depart!C:C,Customs!$A:$A,$A3)

@tonyan 

 

Dear Tonyan,

 

I just tried to understand your query. As far as I understand well, I made a dynamic table which you can find attached. The table is consisted of three sheets (same sheet names like yours). Also, I made one Summary Sheet. I found sales amounts based upon sales data for each sheet and made it shown on different columns. Later, I summed them up.

It is very possible that I don't answer to your question directly, However, I can tell you that in my opinion it is the best way to find the lookup data separately and sum them up.
As for your formula, I didn't understand why you are looking for close numbers like indicating "true". 

 

Good luck.

P.S.
=IFERROR(VLOOKUP(A2,DeparturBilled!$B$2:$E$51,4,FALSE),"")

=IFERROR(VLOOKUP(A2,'Non-SignatoryBilled'!$B$2:$E$51,4,FALSE),"")

=IFERROR(VLOOKUP(A2,CustomsBilled!$B$2:$E$51,4,FALSE),"")

 

 

Best Response confirmed by tonyan (Occasional Contributor)
Solution
Check my sample file and comment. Thanks
I use the Sumifs and that work great! Thanks