"multiply" IF

stan1986

New Member
Joined
Mar 23, 2009
Messages
8
I have two columns (A & B). Column A are forecasted prices and Column B are the actuals. In column C, I am summing the products of either column multiplied by one cell, which is the "unit count". I am summing all of column C to total the most approximate budget.

PROBLEM: I want each cell in column C to contain a formula that will multiple the "unit count" (one cell) by column B IF there is a number > 0 there. IF there is not, I want it to multiply the "unit count" (one cell) by column A.

Unit Count: 2

A B C
1 0 ????
3 5 ????
4 5 ????
5 6 ????
5 0 ????

I want a formula in column C that makes the ????'s 2,10,10,12,10 respectively. Column C would then total 44.

PLEASE HELP!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi and welcome to the board!!!
Code:
=IF(B2,B2*2,A2*2)
Hint: If UC will vary, name a cell for it(Say UC) or maybe even a Named Formula(Insert>Name>Define, refers to =2). Now your formula would be
Code:
=IF(B2,B2*UC,A2*UC)
Either a named range or formula can be easily changed
lenze
 
Upvote 0
stan1986,

Cell B1 is range name "UnitCount".

Excel Workbook
ABC
1Unit Count2
2
3102
43510
54510
65612
75010
844
Sheet1



The formula in cell C3 (copied down to C7):
=IF(B3=0,UnitCount*A3,UnitCount*B3)


Have a great day,
Stan
 
Last edited:
Upvote 0
Thank you so much to everyone who responded. This is a great community that I'm now thrilled to be a part of. Not only did I get my question answered but I've gotten variations that have helped me expand my excel knowledge. Best of all, everyone seems really sweet. THANKS for the help and warm welcomes!
 
Upvote 0

Forum statistics

Threads
1,196,048
Messages
6,013,089
Members
441,747
Latest member
darkman77

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