+ Reply to Thread
Results 1 to 4 of 4

Userform; Output displays in varying range depending on Combobox selection

  1. #1
    Registered User
    Join Date
    09-27-2021
    Location
    Calgary, Alberta
    MS-Off Ver
    2019
    Posts
    1

    Red face Userform; Output displays in varying range depending on Combobox selection

    Hello all!

    Looking for some help from anyone who has experience with userforms and getting the data allocated to its proper place.

    My code is currently working with displaying the inputs from my userform into the proper columns, and is correctly finding the last populated row...but I am trying to find a solution for when a specific value is selected off of my first combo-box, a dropdown menu, the data is displayed into the last populated row of a specified range.

    ex. when combobox1 = a, the data from the userform is added into the range A1:AA50
    when combobox1 = b, the data is added into the range A51:AA100
    when combobox1 = c, the data is added into the range A101:AA150
    etc...

    I have product categories which have respective individual products and information which need to be added underneath of the proper category, and so on....

    My current code is as follows:

    Please Login or Register  to view this content.
    Thank you in advance!
    Last edited by AliGW; 09-27-2021 at 05:40 PM.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Userform; Output displays in varying range depending on Combobox selection

    see big yellow banner - for positive response upload your workbook - far easier for us to then give suitable advice.
    also moderators will require you to place code between code tags - as this is your first post they may be kind enough to do it on this occasion for you.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    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,729

    Re: Userform; Output displays in varying range depending on Combobox selection

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new here, I have done it for you today.)
    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.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Userform; Output displays in varying range depending on Combobox selection

    I am trying to read between the lines and picture your data storage sheet, is your data in two blocks (one below the other - i.e. two separate categories).
    If so this is bad structure for data handling - put everything in one table with an extra column at the start containing the category name.
    This may seem counter-intuitive however as your data grows you will see the reason (i.e.you do not have to restructure your table and start re-coding limits).
    Far easier to illustrate when you have uploaded your workbook.

+ 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. [SOLVED] Userform copy textbox value to different range depending on Combobox selection
    By icsiszer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-11-2018, 03:42 AM
  2. Copy, paste, and clear contents (i.e move) a range depending on combobox selection
    By ANDLU89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2018, 03:43 AM
  3. Graph output on userform via combobox worksheet selection
    By ThePeoplesClub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2016, 08:53 AM
  4. [SOLVED] Need help transferring data from a userform to worksheet depending on a combobox selection
    By Annamarie in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-08-2014, 11:11 AM
  5. [SOLVED] Userform - Combobox Cell selection Name Range
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-31-2014, 11:29 AM
  6. Replies: 5
    Last Post: 06-21-2013, 08:42 AM
  7. [SOLVED] Fill a cell via textbox on userform depending on combobox selection
    By Rhamilton2512 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2012, 10:29 AM

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