Formula Question -Dynamic Table Transaction Total column

CJAM

New Member
Joined
Jul 16, 2012
Messages
1
I am struggling with a formula in table.

Currently, I have transactional data where I select/type one (1) possible value out of five (5) in column A.

Value two (2) and value five (5) need to have column B and C multiplied for a total value in column D. (number of pieces * the price per piece = total)

Value one (1), three (3), and four (4) need to transfer the value in C into column D. This value is a total price regardless of the number of pieces.

I've included a picture to visually described what I would like to happen, which is one (1) formula in column D that figures out which formula to use based on the value (Ex1-Ex5) in column A.

I've done two (2) sumif functions to get the columns on the right: (The only way I could figure out how to do this, so far)
=sumif($A2,"Ex2",$B2)*$C2
=sumif($A2,"Ex1",$B2)*1

Possible Value
# of piecespricetotal
Ex150$100.00 $0.00$100.00
Ex22$0.50 $1.00$0.00
Ex55$0.25 $0.00$0.00
Ex125$20.00 $0.00$20.00
Ex310$0.10 $0.00$0.00
Ex135$40.00 $0.00$40.00
Ex43$0.75 $0.00$0.00
Ex525$0.01 $0.00$0.00

<colgroup><col><col><col span="5"></colgroup><tbody>
</tbody>

Thanks in advance.
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi CJAM,
If I understand you correctly this should work.

In cell D2 type =Total
Keep that cell selected and go to formulas menu, click name manager, click new, in the name box enter Total
In the refers to box type this formula ~
=IF(OR($A2="EX2",$A2="EX5"),$B2*$C2,$C2)
Now click OK and it will change the formula to show sheet name.

Now just fill down cell D2 for as many cells as required.

Cheers.
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,845
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top