# Ranbetween and if

1. ## Re: Ranbetween and if

John, the problem in all the formulas I have tried is that I need to be able to select how many digits I want the number to have in the divisor that at the same time is less than the dividend. In all the formulas i get to have a number that is less but I can't choose the amount of digits.
Look at the picture, I use the formula and even though I selected to have a 3 digit and the second a 2 digit it returned a 3 digit

2. ## Re: Ranbetween and if

Example of the sheet

3. ## Re: Ranbetween and if

Post your real file; you have all the information to make it work but you will (likely) need an IF statement to manage the various conditions.

4. ## Re: Ranbetween and if

See the attached ...

5. ## Re: Ranbetween and if

Here is the original file

6. ## Re: Ranbetween and if

in H3

=RANDBETWEEN(10^(\$C\$7-1),10^\$C\$7-1)

in J3

=IF(\$C\$7<>\$C\$10,RANDBETWEEN(10^(\$C\$10-1),10^\$C\$10-1),RANDBETWEEN(10^(\$C\$10-1),\$H3-1))

the last does not test if C7 < c10 (although I don't see why that condition should not exist)!!

7. ## Re: Ranbetween and if

The formula works allowing me to choose the amount of digits for each number but do you know why it is still giving me some number with the divisor grater than the dividend like the two marked in the picture?

Never mind! I found it was a mistake I made when writing the formula.

8. ## Re: Ranbetween and if

Because you have changed all the formulas (using the ones I gave) in every cell ????

9. ## Re: Ranbetween and if

It was my mistake. THank you so much for all your help!!!!

10. ## Re: Ranbetween and if

You're welcome.

Page 2 of 2 First 1 2

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1