Sum Query

1 view
Skip to first unread message

Ashu K

unread,
Sep 2, 2015, 7:18:33 AM9/2/15
to Excel VBA Lab
Dear All,

I want sum of Potato and Orange.

Output is : 158

Data :


Vegetable  Price Fruit  Price
Potato 10 Apple 300
Tamato 55 Orange 40
Potato 14 Grapes 50
Cauliflaur 18 Banana 35
Brinjal 94 Papaya 10
Lady Finger 26 Apple 100
Potato 34 Orange 60



Thanks & Regards
Ashu Kenith

Ashish Bhalara

unread,
Sep 2, 2015, 8:31:58 AM9/2/15
to Excel VBA Lab
Hi Ashu K,

Check the below formula for given data with predict column of A & B for Vegetable and column D & E for Fruit.

=SUMPRODUCT((A2:A8="Potato")*(B2:B8))+SUMPRODUCT((D2:D8="Orange")*(E2:E8))

Regards.
Ashish Bhalara

--
www.ExcelVbaLab.com
---
You received this message because you are subscribed to the Google Groups "Excel VBA Lab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ExcelVbaLab...@googlegroups.com.
To post to this group, send email to Excel...@googlegroups.com.
Visit this group at http://groups.google.com/group/ExcelVbaLab.
To view this discussion on the web visit https://groups.google.com/d/msgid/ExcelVbaLab/f6a2a61c-f0c4-4a47-abe8-8dfea5f29b0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ashu K

unread,
Sep 3, 2015, 2:57:44 AM9/3/15
to Excel VBA Lab
Dear Ashish Sir,

Thank you..!
Reply all
Reply to author
Forward
0 new messages