Help!!!

nganguyen303

New Member
Joined
Apr 14, 2011
Messages
9
Hi,

I have a calculation to do. The formula is (on hand/sold quantity)*30.
However, on top of that, if on hand= 0 and sold quantity = 0 , then the answer should be 0.
if on-hand >=1 and sold quantity = 0, then the answer should be 30.

How do I write one whole formula to express this?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Using A1 as Sold Quantity and B1 as On Hand...
=IF(A1=0,IF(B1=0,0,IF(B1<1,30,(B1/A1)*30)),(B1/A1)*30)
 
Last edited:
Upvote 0
Hi,

I have a calculation to do. The formula is (on hand/sold quantity)*30.
However, on top of that, if on hand= 0 and sold quantity = 0 , then the answer should be 0.
if on-hand >=1 and sold quantity = 0, then the answer should be 30.

How do I write one whole formula to express this?

if on-hand = 0 And sold-qty = 0 then
result = 0
else
result = (on-hand/sold-qty) * 30
end if
 
Upvote 0
Happy to help! Though, personally I think VoG's formula is easier to understand/use.
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,610
Members
452,931
Latest member
The Monk

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