Help with formula whole numbers divided

panorama

New Member
Joined
Sep 30, 2011
Messages
5
Hi, first post....

I have a chart that starts at (which has been worked out manually)
$0.01 to $122.14 =1 UNIT
$122.15 to $244.28 =2 UNITS
$244.29 to $366.42 =3 UNITS

and so on this is based on a Unit whose value is $122.14.

I want to create a spreadsheet where the user inputs a dollar amount and the result is displayed for the correct amount of units.

so if I divide the unit $122.14 into say the first row .05 cents I get a result of .0004093.
I want it to be a whole number 1 UNIT if the user inputs .05.

Any idea how to do this???????

Thanks
Stephen
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi, first post....

I have a chart that starts at (which has been worked out manually)
$0.01 to $122.14 =1 UNIT
$122.15 to $244.28 =2 UNITS
$244.29 to $366.42 =3 UNITS

and so on this is based on a Unit whose value is $122.14.

I want to create a spreadsheet where the user inputs a dollar amount and the result is displayed for the correct amount of units.

so if I divide the unit $122.14 into say the first row .05 cents I get a result of .0004093.
I want it to be a whole number 1 UNIT if the user inputs .05.

Any idea how to do this???????

Thanks
Stephen
Try this...

A1 = some number like 300.

=CEILING(A1/122.14,1)
 
Upvote 0
If your 122.14 figure is in cell C1, then this would do the trick...
=IF(MOD(B2,$C$1)>0,INT(B2/$C$1)+1,INT(B2/$C$1))
where B2 is your dollar amount to convert into whole number.
Hope this is what you needed. Of course, you could do the
more efficient function, like T. Valko suggests!...
Larry
 
Upvote 0
Hi Stephen,

Try this formula:

=IF(AND(A1>=0.01,A1<=121.24),"1U",IF(AND(A1>=122.15,A1<=244.28),"2U",IF(AND(A1>=244.29,A1<=366.42),"3U","")))

Best Regards

Soemesh.
 
Upvote 0
Hi again, after having a think about this.

I also would like it to produce a max of 100 units as an answer

so if someone entered $12,214.00 which would give the answer 100 units (max allowed).

and then entered a number above this figure instead of answer = 100 units it said "max units allowed"

Hope the above makes sense
 
Upvote 0
Hi again, after having a think about this.

I also would like it to produce a max of 100 units as an answer

so if someone entered $12,214.00 which would give the answer 100 units (max allowed).

and then entered a number above this figure instead of answer = 100 units it said "max units allowed"

Hope the above makes sense
Try this...

=IF(CEILING(A1/122.14,1)>100,"Max Units Allowed",CEILING(A1/122.14,1))
 
Upvote 0
WOW, thanks for the quick response........... works great.

PS Somesh yours works as well but I would have too many cells
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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