Chito
Chito

Reputation: 315

Excel formula or Vba to Sum of all lookup value from multiple excelsheet

I need some help for the below scenario,

  1. Sheet1 A2 has a date
  2. Sheet2 and Sheet3 has dates in column A and numbers in column B

example as below, enter image description here

I want to get the sum value from Sheet2 & Sheet3 B column for all the values in Sheet1 A2 if finds in Sheet2 & Sheet3 A.

Below is my formula which I can get the sum from Sheet2 but not able to do with both sheet2 and sheet3.

{=SUM((Sheet2!$B$2:$B$65500)*(Sheet2!$A$2:$A$65500='Sheet1'!A2))}

Please help in formula or vba, thanks

Upvotes: 0

Views: 230

Answers (1)

Dan Donoghue
Dan Donoghue

Reputation: 6216

Can't you just add the two?

In B2 of sheet 1

=SUMIF(Sheet2!A:A,A2,Sheet2!B:B)+SUMIF(Sheet3!A:A,A2,Sheet3!B:B)

Upvotes: 1

Related Questions