+ Reply to Thread
Results 1 to 13 of 13

auto populate cells based on quantity

  1. #1
    Registered User
    Join Date
    02-09-2020
    Location
    Seoul
    MS-Off Ver
    2016
    Posts
    15

    auto populate cells based on quantity

    Hello.
    I'm trying to auto populate cells based on given quantity.
    For example if I enter 1 in the quantity cell I want one height cell auto populated with a predefined ranged of numbers. If 3 is entered then 3 cells would be auto populated, and so forth.
    Is this possible using formulas?
    Any help would be super appreciated. Thank you.
    Attached Files Attached Files
    Last edited by ragnadok; 02-09-2020 at 07:40 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,615

    Re: auto populate cells based on quantity

    Welcome to the forum.

    Where are your expected results? All I can see are randomly generated numbers.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-09-2020
    Location
    Seoul
    MS-Off Ver
    2016
    Posts
    15

    Re: auto populate cells based on quantity

    Hello and thank you for the welcome.
    I'm trying to automatically fill height with random numbers based on given quantity but i am currently filling it in manually.
    This sheet is just one part and goes on for hundred of different tree types so it can get really repetitive to fill in all the heights.
    Thank you.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,615

    Re: auto populate cells based on quantity

    OK - that's not what I asked. WHERE are you expected results? Cell references, please.

  5. #5
    Registered User
    Join Date
    02-09-2020
    Location
    Seoul
    MS-Off Ver
    2016
    Posts
    15

    Re: auto populate cells based on quantity

    Sorry if my question wasn't thorough enough.
    I just want to auto populate columns D to I with random numbers based on entered quantity in column C.
    So, if I entered the number 10 in quantity then all six columns in height would be autofilled with a random number because there are only six columns of "height". If I enter 2 in column C I want two columns of "height" to be auto filled with a random number and so on.
    Hope you understand my question.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,615

    Re: auto populate cells based on quantity

    No, sorry, I don't get it at all.

  7. #7
    Registered User
    Join Date
    02-09-2020
    Location
    Seoul
    MS-Off Ver
    2016
    Posts
    15

    Re: auto populate cells based on quantity

    No worries.
    I uploaded a simplified sample sheet.
    I just want to auto fill the heights with random numbers based on quantity entered.
    If 5 entered in quantity then I want 5 cells under height to be automatically populated with random numbers.
    Thank you.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,615

    Re: auto populate cells based on quantity

    No clearer (to me) - sorry. Wait for someone else to have a look.

  9. #9
    Registered User
    Join Date
    02-09-2020
    Location
    Seoul
    MS-Off Ver
    2016
    Posts
    15

    Re: auto populate cells based on quantity

    no problem. thanks anyway!

  10. #10
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: auto populate cells based on quantity

    Try this in B2:

    =IF(COLUMNS($B2:B2)<=$A2,RANDBETWEEN(5,6),"")

  11. #11
    Registered User
    Join Date
    02-09-2020
    Location
    Seoul
    MS-Off Ver
    2016
    Posts
    15

    Re: auto populate cells based on quantity

    Thank you so much. That worked perfect.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,615

    Re: auto populate cells based on quantity

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  13. #13
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: auto populate cells based on quantity

    You're welcome! Thank you for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 06-08-2018, 11:15 AM
  2. [SOLVED] VBA: Auto-fill cells based on user defined values and quantity
    By Dracius in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-24-2018, 03:46 PM
  3. Excel 2016 / Auto populate other cells based off two different cells data
    By jmyersnc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2017, 02:21 PM
  4. [SOLVED] VBA - Auto populate cells based on another tab
    By Lifeless in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2017, 03:46 PM
  5. Populate cells based on drop downs and quantity
    By avozella in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2015, 10:06 PM
  6. Macro to auto-populate cells based on content of other cells
    By BristolJGM in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-05-2015, 07:47 PM
  7. Replies: 3
    Last Post: 02-28-2012, 11:54 AM

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