fayez_MrExcel
Active Member
- Joined
- Oct 29, 2005
- Messages
- 439
- Office Version
- 365
- Platform
- Windows
Given the table, First I want to match F2 to range a2:a11, if it matches it will take the amount if there are more than 1 Emp.No. (duplicate emp. no. with different amount) it will sum all the amount. the syntax of the above shall be placed in G2
Book2 | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Emp. No | Name | Amount | Emp. No. | Amount | ||||
2 | 1003 | Mike | 100 | 1001 | |||||
3 | 1002 | Jake | 200 | 1002 | |||||
4 | 1004 | Melanie | 300 | 1003 | |||||
5 | 1001 | John | 400 | 1004 | |||||
6 | 1005 | Jerry | 500 | 1005 | |||||
7 | 1006 | Jack | 800 | 1006 | |||||
8 | 1007 | Jessy | 900 | 1007 | |||||
9 | 1008 | Jeremy | 100 | 1008 | |||||
10 | 1001 | John | 146 | 1009 | |||||
11 | 1005 | Jerry | 50 | ||||||
Sheet1 |