+ Reply to Thread
Results 1 to 3 of 3

Can I put a List of cells into a UserForm Textbox and have the list assigned a cell value?

Hybrid View

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    10

    Red face Can I put a List of cells into a UserForm Textbox and have the list assigned a cell value?

    I would like to take a List of numbers, which come from a separate spreadsheet, place them into a UserForm text box and then use a command button to input the
    list of numbers into a column of cells. The list would often vary, between 1 and 10 entries. But if I could do this, I would be able to resolve an issue with my spreadsheet that continues to haunt me (the dreaded number stored as text.....). I know that you can assign a single textbox value to a single range-cell value. But if I could input a list at a time, it would obviously save a lot of effort.

    Example

    In spreadsheet #1, I would copy the list below.


    25466
    87550
    66985
    44252

    In the user form I would paste these numbers into the text box and they would be input into Sheet #2

    B6 = 25466
    B7 = 87550

    etc. etc.

    Any other suggestions would be helpful, but if this system would work, I would be greatly appreciative.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Can I put a List of cells into a UserForm Textbox and have the list assigned a cell va

    Hi,

    Are you saying that you want to BUILD a list on the sheet by using the Userform Text box from time to time?

    Or are you implying you've imported some 'numbers' which are actually text and want to convert them to numbers. In which case you could use the old PasteSpecial multiply trick. i.e. enter the number 1 in a cell, Copy it, select your range of text numbers and use the PasteSpecial Multipy.

    Alternatively if you want to use a formula use =Value(A1)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    07-24-2013
    Location
    New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Can I put a List of cells into a UserForm Textbox and have the list assigned a cell va

    Basically, I get spreadsheets from an analyst with a list of numbers in it - (cells C2-C10) For whatever reason, they are numbers formatted as text. I was thinking that if I copy this list and paste the number list into a userform textbox, then use the code to populate my column of cells (B6-B16), it would eliminate the need for the pasteSpecial multiply trick. Thereby, I would avoid having an extra step.

    Thanks!

+ 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] Code to list cells with adjacent blank cell in userform listbox.
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 6
    Last Post: 12-24-2013, 10:27 PM
  2. List existing data in a UserForm Textbox and then be able to change the data.
    By gnaske in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-01-2013, 02:01 PM
  3. Replies: 5
    Last Post: 11-28-2012, 09:58 AM
  4. List of values assigned to list of names
    By Cicada in forum Excel General
    Replies: 8
    Last Post: 08-18-2011, 06:12 PM
  5. User form with textbox assigned a cell value
    By Austin Zeagman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-15-2010, 01:22 PM

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