Vinicius Segalin
Vinicius Segalin

Reputation: 45

Excel logic - matching columns

My situation is the following:

The 'Day' column is 1 to 365, and each day is repeated 24 times (for the 24 hours). Each day and hour together have a Degree value, represented by the B column. I need to multiple the B column with the E column everytime A column matches D (eg. B2*E2, B3*E2, B4*E2, B7*E3).

How can I do that? I'm really confused here. Thank you

Upvotes: 0

Views: 41

Answers (2)

user4534582
user4534582

Reputation: 11

Two ways:

VLOOKUP(A2,$D$2:$E$366,2,FALSE)*B2

SUMPRODUCT(B2*($D$2:$D$366=A2)*$E$2:$E366)

Upvotes: 1

tigeravatar
tigeravatar

Reputation: 26670

Using your shown example, in cell C2 and copied down:

=B2*VLOOKUP(A2,$D$2:$E$366,2,FALSE)

Upvotes: 1

Related Questions