+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 16 to 25 of 25

Ranbetween and if

  1. #16
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    110

    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. #17
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Ranbetween and if

    Example of the sheet
    Attached Images Attached Images

  3. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    16,520

    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. #19
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    16,520

    Re: Ranbetween and if

    See the attached ...
    Attached Files Attached Files

  5. #20
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Ranbetween and if

    Here is the original file
    Attached Files Attached Files

  6. #21
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    16,520

    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. #22
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    110

    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.
    Attached Images Attached Images
    Last edited by lizsantiago07; 01-03-2018 at 05:18 PM.

  8. #23
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    16,520

    Re: Ranbetween and if

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

  9. #24
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Ranbetween and if

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

  10. #25
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    16,520

    Re: Ranbetween and if

    You're welcome.

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2

Thread Information

Users Browsing this Thread

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

Bookmarks

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