![]() |
Lookup and Sum
I have three columns set out as below:
A B C L 123 Dec-07 M 456 Jan-08 S 789 May-07 E 123 Dec-07 L 456 Dec-07 Column C is formatted as text. I need to sum items in B where A and C are a match. That is, if A = "L" and C = "Dec-07" I need to get 579 from B. What formula should I be using? I have played with LOOKUP, VLOOKUP and SUMPRODUCT but all to no avail. AlexW |
Lookup and Sum
Try this:
=SUMPRODUCT(--(A1:A5="L"),--(C1:C5="Dec-07"),B1:B5) -- Biff Microsoft Excel MVP "Alex.W" wrote in message ... I have three columns set out as below: A B C L 123 Dec-07 M 456 Jan-08 S 789 May-07 E 123 Dec-07 L 456 Dec-07 Column C is formatted as text. I need to sum items in B where A and C are a match. That is, if A = "L" and C = "Dec-07" I need to get 579 from B. What formula should I be using? I have played with LOOKUP, VLOOKUP and SUMPRODUCT but all to no avail. AlexW |
Lookup and Sum
Many thanks it worked a treat.
"T. Valko" wrote: Try this: =SUMPRODUCT(--(A1:A5="L"),--(C1:C5="Dec-07"),B1:B5) -- Biff Microsoft Excel MVP "Alex.W" wrote in message ... I have three columns set out as below: A B C L 123 Dec-07 M 456 Jan-08 S 789 May-07 E 123 Dec-07 L 456 Dec-07 Column C is formatted as text. I need to sum items in B where A and C are a match. That is, if A = "L" and C = "Dec-07" I need to get 579 from B. What formula should I be using? I have played with LOOKUP, VLOOKUP and SUMPRODUCT but all to no avail. AlexW |
Lookup and Sum
You're welcome. Thanks for the feedback!
-- Biff Microsoft Excel MVP "Alex.W" wrote in message ... Many thanks it worked a treat. "T. Valko" wrote: Try this: =SUMPRODUCT(--(A1:A5="L"),--(C1:C5="Dec-07"),B1:B5) -- Biff Microsoft Excel MVP "Alex.W" wrote in message ... I have three columns set out as below: A B C L 123 Dec-07 M 456 Jan-08 S 789 May-07 E 123 Dec-07 L 456 Dec-07 Column C is formatted as text. I need to sum items in B where A and C are a match. That is, if A = "L" and C = "Dec-07" I need to get 579 from B. What formula should I be using? I have played with LOOKUP, VLOOKUP and SUMPRODUCT but all to no avail. AlexW |
All times are GMT +1. The time now is 11:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com