ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Product of 3 Cells based on criteria (https://www.excelbanter.com/excel-programming/420048-product-3-cells-based-criteria.html)

aileen

Product of 3 Cells based on criteria
 
I have 6 columns of data as such:

A B C D E F
150 0 0 P .55 250
0 325 0 C 1.60 50
0 0 35 F .77 100

In the G column,I need to get the product of columns A,E,F if D = P and the
product of B,E,F if D = C and the product of C,E,F if D = F. Is this
possible? Any help is always appreciated. Thanks.

Bernard Liengme

Product of 3 Cells based on criteria
 
Could be done with nested IFs but this works
=(A1*(D1="P")+B1*(D1="C")+C1*(D1="F"))*E1*F1
You want E*F*(A if..., or B if ..., or C if...)

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"aileen" wrote in message
...
I have 6 columns of data as such:

A B C D E F
150 0 0 P .55 250
0 325 0 C 1.60 50
0 0 35 F .77 100

In the G column,I need to get the product of columns A,E,F if D = P and
the
product of B,E,F if D = C and the product of C,E,F if D = F. Is this
possible? Any help is always appreciated. Thanks.




aileen

Product of 3 Cells based on criteria
 
Works perfectly. Thanks much!

"Bernard Liengme" wrote:

Could be done with nested IFs but this works
=(A1*(D1="P")+B1*(D1="C")+C1*(D1="F"))*E1*F1
You want E*F*(A if..., or B if ..., or C if...)

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"aileen" wrote in message
...
I have 6 columns of data as such:

A B C D E F
150 0 0 P .55 250
0 325 0 C 1.60 50
0 0 35 F .77 100

In the G column,I need to get the product of columns A,E,F if D = P and
the
product of B,E,F if D = C and the product of C,E,F if D = F. Is this
possible? Any help is always appreciated. Thanks.






All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com