Rand Roundup & Custom autofilter

sythong

Active Member
Joined
Jun 26, 2004
Messages
324
Greetings again.

I am having problem trying to get 2 related problems to work.

1. I want to roundup to the nearest cents (presently I use randbetwen(100,200)
and the result does not show any cents. How do I get it to work to show cents
eg 100.20 and if possible to show it only ending with 0 or 5 because for cash
transactions the common curency is 10, 20 and 50 cents.

2. The other thing that i am grappling (which again is related to the top) with is
I have already generated a set of figures and it has ending cents ranging from
1 to 9. I tried to do a custom autofilter to look for "ends with" and apply any
one of the following, .01,.02,.03,.04,.06,.07,.08,.09 but it does not work.
So I have to walk through every individual cell to change those in that range to
manually change the range to either a .05 or zero where the cents are.

Thanks again for reading
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
If I have understood your problem this will produce numbers up to 100 dollars ending in 0 or 5 cents

=ROUND(RAND()*20,2)*5

If you want a different number just divide the maximum by 5 and use that to replace teh 20 in the above formula if you want it between 100 and 200 dollars then just add 100 to the above formula like this:

=100+ROUND(RAND()*20,2)*5
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,713
Members
452,939
Latest member
WCrawford

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