简体   繁体   中英

I need vlookup formula to extract data from 3 excel sheets

I have a use case with excel. I have three different excel sheets namely raw data , reference , report as below. Report sheet contains the total expense of each person (which needs to be calculated), reference sheet contains expense category for each person and raw data sheet contains expense name and expense value. I need to find the total expense of each person(column B in the report sheet) using VLOOKUP or any other formula.

I need single formula to find the total expense of each person using three sheets. I am aware of joins adn importing data in excel. But, I want it to be implemented with formula only.

原始数据

Raw_data

参考

Reference sheet

报告

Report

You may create column C on your Raw Data sheet by using INDEX + MATCH function to get names from column A of the your reference sheet;

=INDEX($A$2:$A$13,MATCH(A1,$B$2:$B$13,0),0)

In this forumula $A$2:$A$13 and $B$2:$B$13 should be selected from reference data excel while A1 should be from raw data excel. Then you can instert following formula to your report excel;

=SUMIFS($C$2:$C$13,$A$3:$A$13,A2)

In this formula $C$2:$C$13 and $A$3:$A$13 should come from your raw data and A2 should set for report excel.

I hope it is clear to you. Good luck.

Assuming you have office 365, the above can be easily done

=SUM(SUMIF($A$2:$A$7,FILTER($E$2:$E$7,$D$2:$D$7=G2),$B$2:$B$7))

Sample data below

Sample data

Try this:

=SUMPRODUCT(IF(A2=RIGHT(Raw_data!A:A,1),Raw_data!B:B,0))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM