+ Reply to Thread
Results 1 to 28 of 28

HELP! Adding numbers from 7000 - 60,000 Automatically

Hybrid View

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    HELP! Adding numbers from 7000 - 60,000 Automatically

    I need to create a log that will generate a number between 7000 to 60,000 in two columns and it will add random number between 15 - 60 on each row to that value

    For example:

    A1 | B1
    ___________
    7000 | 7015
    7015 | 7030
    7030 | 7045

    This will add value of 15.


    So, is it possible to do this? if so, I will like to start A1 with 7000 and add a random value between 15-60 to B1 and continue down till it reaches 60,000. Help Please I've been doing this manually with the =A1+15 or =A2+20 or =A3+30 or =A4+40 function on each row and its taking me forever and don't know of any other way. Any help will be greatly appreciated.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    In A2 use..

    =MIN(A1+RANDBETWEEN(15,60),60000)

    and copy down until you see 60000
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Thanks so much but I want the value to go from A1 to B1 and then continue on A2 to B2 like in the example.

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    In C2, (or another cell) enter:
    =RANDBETWEEN(15,60)

    Copy C2 and PasteSpecialValues onto C1

    C2 will have the random value and C1 will "freeze" the value for as long as you like.

    In A1 enter 7000. In A2, enter:

    =IF(OR(A1>60000,A1=""),"",A1+$C$1) and copy A2 down thru A60000
    Gary's Student

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    In that case

    In B1
    =MIN(A1+RANDBETWEEN(15,60),60000)

    In A2
    =MIN(B1+RANDBETWEEN(15,60),60000)

    Copy down both columns...till 60000

    Copy--Paste special values

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    you are not clear are all the rows in col a random or are they calculated?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    It's not working out for me

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    See attached...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Thank You Soooo much Ace_XL you're awesome

  10. #10
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Quote Originally Posted by Ace_XL View Post
    See attached...
    Sorry but I just notice that the numbers on A2 doesn't follow the continuance from B1 which tells me that is not possible or is it? like from A1-B1 7000 - 7015 then from A2 it should continue from B1 so it would be 7015. In other words I want the number that generates in B1 to carry over to the next row which in this case would be A2.

    A1 | B1
    __________
    7000 - 7015
    A2 | B2
    __________
    7015 - (random number) <------ so this random number will carry to A3 column and so on

    I'm really sorry for the confusion

  11. #11
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Sorry but I just notice that the numbers on A2 doesn't follow the continuance from B1 which tells me that is not possible or is it? like from A1-B1 7000 - 7015 then from A2 it should continue from B1 so it would be 7015. In other words I want the number that generates in B1 to carry over to the next row which in this case would be A2.

    A1 | B1
    __________
    7000 - 7015
    A2 | B2
    __________
    7015 - (random number) <------ so this random number will carry to A3 column and so on

    I'm really sorry for the confusion

  12. #12
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    In B1
    =MIN(A1+RANDBETWEEN(15,60),60000)

    In A2
    =MIN((B1*2)-A1,60000)

    In B2
    =MIN((A2*2)-B1,60000)

    Copy A2 & B2 down..

  13. #13
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    That didn't work the numbers on A column are still random and don't follow from B column

  14. #14
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    A2 copied down column A would be
    =IF(ISNUMBER(B1),B1,"")

    From your example, it looks like once the random number is generated in B1 (adding between 15 to 60 to A1), you continue to use that number all the way down. Is that correct?
    If so,
    in B2 copied down
    =IF(A2+($B$1-$A$1)>60000, "", A2+$B$1-$A$1)
    does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  15. #15
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Quote Originally Posted by ChemistB View Post
    A2 copied down column A would be
    =IF(ISNUMBER(B1),B1,"")

    From your example, it looks like once the random number is generated in B1 (adding between 15 to 60 to A1), you continue to use that number all the way down. Is that correct?
    If so,
    in B2 copied down
    =IF(A2+($B$1-$A$1)>60000, "", A2+$B$1-$A$1)
    does that work for you?
    This worked but all the random values are the same (it doesn't generate a random value between 15-60)

  16. #16
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    See attached..
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    08-31-2012
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    If you want column A to reflect the random number generated in B1, then use =B1 in cell A2 and fill down.

    Terry

  18. #18
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    or a1=7000
    b1 filled down =a1 +randbetween(15,60)
    a2 =b1 filled down

  19. #19
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    see attached piclog_.jpg

  20. #20
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    See the attachment
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Quote Originally Posted by ChemistB View Post
    See the attachment
    All the random numbers are all the same value is it possible to change those values to different numbers for each row? Thanks in advance

  22. #22
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Quote Originally Posted by puchimo View Post
    All the random numbers are all the same value is it possible to change those values to different numbers for each row? Thanks in advance

    All the values are 39 and it doesn't generate randomly

  23. #23
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    try this then,please take time to read all replies not just the ones you think may work!
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Quote Originally Posted by martindwilson View Post
    try this then,please take time to read all replies not just the ones you think may work!
    Thanks this one worked!

  25. #25
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    see post #16

  26. #26
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    Quote Originally Posted by martindwilson View Post
    see post #16
    I try that but the random number its all the same for all the rows. I like to have different numbers generate and not the same on all rows.

  27. #27
    Registered User
    Join Date
    11-14-2012
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    How can I stop the values in the formula from changing every time I add content to the table? Whenever I add a row or column the value changes randomly, I want to stay at a value and not change at all.

  28. #28
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: HELP! Adding numbers from 7000 - 60,000 Automatically

    turn of auto calculate in options, then use f9 to recalculate when needed
    or put it on another sheet f9 to force a recalculate then copy paste special values to another location to work on

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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