Home

Excel Formula Help

%3CLINGO-SUB%20id%3D%22lingo-sub-854692%22%20slang%3D%22en-US%22%3EExcel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854692%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20a%20formula%20to%20retrieve%20data%20from%20one%20tab%20to%20bring%20back%20to%20another%20tab.%20I%20have%202%20lookup%20criteria%20in%20the%20same%20column%20to%20bring%20back%20the%20sum%20of%20the%20data%20in%20a%20different%20column.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-854692%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-854725%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854725%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408575%22%20target%3D%22_blank%22%3E%40Tim-B%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20hard%20to%20suggest%20any%20formula%20unless%20you%20provide%20more%20details%20like%20what%20are%20those%20criteria%2C%20where%20to%20look%20for%20them%2C%20what%20to%20be%20sum%20etc.%3C%2FP%3E%3CP%3EI%20would%20suggest%20you%20to%20upload%20a%20sample%20file%20and%20mock%20up%20the%20desired%20output%20manually%20to%20show%20us%20what%20exactly%20you%20are%20trying%20to%20achieve.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-854791%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854791%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20need%20is%20a%20formula%20to%20retrieve%20the%20sum%20of%20the%20dollars%20in%20column%20M%20in%20the%20Vendor%20Data%20tab.%20I%20need%20it%20based%20on%20column%20a%20in%20the%20vendor%20purchases%20tab.%20I%20also%20need%20it%20to%20be%20based%20on%20the%20individual%20vendors%20in%20the%20vendor%20data%20tab.%20I.E.%20Vendor%20purchases%20tab%20has%204201%20in%20column%20a%2C%20the%20vendor%20data%20tab%20has%20this%20store%20under%20multiple%20vendors.%20I%20want%20Excel%20to%20sum%20the%20totals%20for%20each%20vendor%20for%20this%20store%20number.%20the%20first%20vendor%20is%20at%20cell%20A3%20with%20different%20store%20numbers%20under%20it%2C%20then%20another%20vendor%20starting%20at%20cell%20A32.%20I%20will%20be%20downloading%20a%20new%20data%20tab%20each%20week%20so%20the%20data%20can%20change%20positions%20weekly%20based%20on%20the%20number%20of%20actual%20purchases%20per%20store.%20Under%20this%20example%204202%20under%201%20800%20RADIATOR%20would%20total%20%24374.60%20for%20this%20example.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-854814%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854814%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408575%22%20target%3D%22_blank%22%3E%40Tim-B%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20details.%3C%2FP%3E%3CP%3EI%20still%20suggest%20you%20to%20upload%20a%20small%20sample%20file%20with%20max%2010%20rows%20of%20data%20on%20both%20the%20Tabs%20along%20with%20the%20desired%20output%20mocked%20up%20manually%20to%20discard%20any%20confusion.%3C%2FP%3E%3CP%3EPlease%20refer%20to%20the%20following%20image%20to%20know%20how%20to%20upload%20a%20sample%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20788px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F131729i43C05B351D2B0AFD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Upload%20File.jpg%22%20title%3D%22Upload%20File.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-854850%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854850%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3EI%20attached%20the%20spreadsheet%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-854917%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854917%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408575%22%20target%3D%22_blank%22%3E%40Tim-B%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETry%20this%20and%20see%20if%20you%20get%20the%20desired%20output...%3C%2FP%3E%3CP%3EIn%20D2%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DSUMIF('Vendor%20Data'!A%3AA%2CA2%2C'Vendor%20Data'!M%3AM)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Eand%20then%20copy%20it%20down.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-854921%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-854921%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3EThat%20does%20not%20do%20the%20trick.%20That%20just%20gives%20me%20the%20total%20for%20all%20vendors%20instead%20of%20each%20specific%20vendor.%20I%20need%20to%20be%20able%20to%20have%20Excel%20look%20up%20the%20vendor%20name%20first%20then%20bring%20back%20the%20purchase%20totals%20per%20store%20under%20just%20that%20vendor.%20I%20want%20it%20to%20be%20able%20to%20look%20them%20up%20that%20way%20no%20matter%20how%20many%20rows%20are%20below%20each%20vendor%20for%20each%20store.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-855074%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-855074%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408575%22%20target%3D%22_blank%22%3E%40Tim-B%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20tried%20with%20Power%20Query%2C%20but%20that's%20only%20mockup.%20Not%20all%20assumptions%20regarding%20Vendor%20Data%20are%20clear.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20838px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F131747i829EB67AA7A7C4BC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-857031%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-857031%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3EQuery%20seems%20to%20be%20bringing%20back%20the%20correct%20info.%20I%20have%20never%20used%20Query%20and%20would%20need%20to%20know%20how%20to%20accomplish%20this%20with%20the%20full%20file%20attached.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-857544%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-857544%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408575%22%20target%3D%22_blank%22%3E%40Tim-B%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20never%20used%20Power%20Query%20it%20will%20take%20some%20time%20to%20investigate%20it%2C%20but%20it%20worth.%3C%2FP%3E%0A%3CP%3EFirst%2C%20if%20you%20are%20on%20Excel%202016%20or%20later%2C%20Power%20Query%20is%20built%20in.%20Otherwise%2C%20for%20Excel%202010%2F2013%20you%20shall%20download%20and%20install%20PowerQuery%20add-in.%3C%2FP%3E%0A%3CP%3EI%20generated%20the%20query%20on%20you%20data%2C%20you%20may%20check%20it%20step%20by%20step.%20From%20current%20workbook%20you%20may%20query%20table%20or%20named%20range%2C%20in%20your%20case%20the%20latest%20works%2C%20named%20range%20VendorData%20is%20added%20as%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20438px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F131970i6A2F9166E49CFF9B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20brief%2C%20we%20query%20this%20named%20range.%20Assuming%20you%20have%20no%20empty%20rows%20in%20between%20of%20data%2C%20we%20cut%20data%20up%20to%20first%20empty%20row.%20After%20that%20we%20keep%20only%20columns%20we%20need%20for%20the%20summary%20and%20remove%20the%20rest.%20With%20next%20block%20we%20select%20only%20vendor%20names%20removing%20vendor%20numbers%20form%20the%20texts.%20As%20result%20we%20have%203%20columns%20-%20vendor%2C%20store%20and%20sum.%20We%20may%20pivot%20it%20them%20within%20the%20query%2C%20but%20since%20you'd%20like%20to%20have%20percentage%20and%20grand%20totals%20it's%20better%20to%20use%20Excel%20Pivot%20Table.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThus%20we%20load%20the%20query%20into%20data%20model%20and%20create%20Pivot%20Table%20based%20on%20it.%20One%20column%20is%20the%20cost%20for%20each%20vendor%20by%20store%2C%20another%20one%20is%20%25%20of%20cost%20for%20each%20column.%20At%20the%20end%20are%20grand%20totals.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPerhaps%20bit%20more%20cosmetic%20is%20required%2C%20but%20depends%20on%20how%20you'd%20like%20to%20present%20the%20result.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20check%20the%20file%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-857802%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-857802%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%20What%20you%20did%20actually%20brought%20back%20the%20right%20information.%20The%20problem%20I%20have%20is%2C%20I%20need%20to%20be%20able%20to%20download%20a%20new%20file%20every%20week%20to%20update%20the%20values.%20This%20doesn't%20seem%20to%20solve%20that%20problem.%20I%20really%20need%20something%20that%20can%20extract%20the%20same%20data%20weekly%20with%20a%20new%20file.%20Thanks%20for%20everything%20you%20have%20done%20so%20far!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-857897%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-857897%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F408575%22%20target%3D%22_blank%22%3E%40Tim-B%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20may%20separate%20data%20source%20and%20report.%20Source%20file%20could%20be%20downloaded%20to%20some%20folder%20locally%20or%20to%20the%20cloud%20as%20often%20as%20necessary%2C%20you%20query%20it%20from%20another%20file%20and%20build%20your%20report.%20The%20only%20you%20need%20is%20to%20click%20Refresh%20All%20to%20obtain%20fresh%20report.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Tim-B
Occasional Contributor

I need a formula to retrieve data from one tab to bring back to another tab. I have 2 lookup criteria in the same column to bring back the sum of the data in a different column. 

11 Replies

@Tim-B 

It's hard to suggest any formula unless you provide more details like what are those criteria, where to look for them, what to be sum etc.

I would suggest you to upload a sample file and mock up the desired output manually to show us what exactly you are trying to achieve.

@Subodh_Tiwari_sktneer 

What I need is a formula to retrieve the sum of the dollars in column M in the Vendor Data tab. I need it based on column a in the vendor purchases tab. I also need it to be based on the individual vendors in the vendor data tab. I.E. Vendor purchases tab has 4201 in column a, the vendor data tab has this store under multiple vendors. I want Excel to sum the totals for each vendor for this store number. the first vendor is at cell A3 with different store numbers under it, then another vendor starting at cell A32. I will be downloading a new data tab each week so the data can change positions weekly based on the number of actual purchases per store. Under this example 4202 under 1 800 RADIATOR would total $374.60 for this example.

@Tim-B 

Thanks for the details.

I still suggest you to upload a small sample file with max 10 rows of data on both the Tabs along with the desired output mocked up manually to discard any confusion.

Please refer to the following image to know how to upload a sample file.

 

Upload File.jpg

@Subodh_Tiwari_sktneerI attached the spreadsheet

@Tim-B 

Try this and see if you get the desired output...

In D2

=SUMIF('Vendor Data'!A:A,A2,'Vendor Data'!M:M)

and then copy it down.

@Subodh_Tiwari_sktneerThat does not do the trick. That just gives me the total for all vendors instead of each specific vendor. I need to be able to have Excel look up the vendor name first then bring back the purchase totals per store under just that vendor. I want it to be able to look them up that way no matter how many rows are below each vendor for each store.

@Tim-B 

I tried with Power Query, but that's only mockup. Not all assumptions regarding Vendor Data are clear.

image.png

 

@Sergei BaklanQuery seems to be bringing back the correct info. I have never used Query and would need to know how to accomplish this with the full file attached. 

@Tim-B 

If you never used Power Query it will take some time to investigate it, but it worth.

First, if you are on Excel 2016 or later, Power Query is built in. Otherwise, for Excel 2010/2013 you shall download and install PowerQuery add-in.

I generated the query on you data, you may check it step by step. From current workbook you may query table or named range, in your case the latest works, named range VendorData is added as

image.png

In brief, we query this named range. Assuming you have no empty rows in between of data, we cut data up to first empty row. After that we keep only columns we need for the summary and remove the rest. With next block we select only vendor names removing vendor numbers form the texts. As result we have 3 columns - vendor, store and sum. We may pivot it them within the query, but since you'd like to have percentage and grand totals it's better to use Excel Pivot Table.

 

Thus we load the query into data model and create Pivot Table based on it. One column is the cost for each vendor by store, another one is % of cost for each column. At the end are grand totals.

 

Perhaps bit more cosmetic is required, but depends on how you'd like to present the result.

 

Please check the file attached.

@Sergei Baklan  What you did actually brought back the right information. The problem I have is, I need to be able to download a new file every week to update the values. This doesn't seem to solve that problem. I really need something that can extract the same data weekly with a new file. Thanks for everything you have done so far! 

@Tim-B 

You may separate data source and report. Source file could be downloaded to some folder locally or to the cloud as often as necessary, you query it from another file and build your report. The only you need is to click Refresh All to obtain fresh report. 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies