+ Reply to Thread
Results 1 to 17 of 17

Enter Userform Data into a range of Cells for Excel 2007

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Enter Userform Data into a range of Cells for Excel 2007

    Hi,
    I am trying to enter the Data from my userform in Excel 2007 to a range of cells. The Range is from A8:M51. I can use this formula below to add the Data but it puts it into Row 60??? This Range is enclosed around other cells with data, so I am not sure if that is why it starts at Row 60? I also need this to clear and have the next data entered into the row below. So Row "A8" should be the first row of Data and when I click on the button to add Data, the userform will clear and I can enter new Data and it would be inserted on Row "A9" when the Add Data button is clicked again.


    Please Login or Register  to view this content.
    Thanks in Advance

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Enter Userform Data into a range of Cells for Excel 2007

    please provide sample workbook bcz its make very easy to give perfect answer
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Enter Userform Data into a range of Cells for Excel 2007

    try this code & note not tested

    hope this will work
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Enter Userform Data into a range of Cells for Excel 2007

    I attached the Sheet that I am trying to input the Data. I tried the code Given but it gives me a Run-time error '1004': Method 'Range' of object'_Worksheet' failed.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Enter Userform Data into a range of Cells for Excel 2007

    where is userforms in attached file

  6. #6
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Enter Userform Data into a range of Cells for Excel 2007

    Sorry, Try this one.
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Enter Userform Data into a range of Cells for Excel 2007

    try the attached file and let me know
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Enter Userform Data into a range of Cells for Excel 2007

    It looked like it was working; however, when I deleted the data to start from Row 8 (A cleared Worksheet), it entered the data in row 8 but when I tried to add the next row of data it is no where to be found. I still get the "Data Added" msg box saying that it added. I reopened yours and cleared the data and started fresh and it did the same thing. It is not putting any more data in the cells once the first row of data is added. Yours did work when I first opened it and the first couple of rows where you had tested was there. I ran the userform and it followed right in line, but it seems once it is cleared it doesn't work anymore?? Suggestions?

  9. #9
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Enter Userform Data into a range of Cells for Excel 2007

    oops , now try this attached file and let me know , as fast as because after half n hour i will log off , i will go to my home
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Enter Userform Data into a range of Cells for Excel 2007

    It looks good so far. Thank you very much.

  11. #11
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Enter Userform Data into a range of Cells for Excel 2007

    Glad I could help

    If the suggestion helps you, then Click * to Add Reputation

  12. #12
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Enter Userform Data into a range of Cells for Excel 2007

    Is there any way to only allow the userform to appear if say I only have "x" amount of data to put in? The Data on the sheet that I entered varies from task to task so I may only input 2 rows of data or it could be the whole page. The numbers auto populate from another sheet into the "Isolation Point No." Column, which is the second column. I would like my userform to reference this column and have the userform close once the desired amount is reached? Thanks

  13. #13
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Enter Userform Data into a range of Cells for Excel 2007

    sorry i didn't get you what exactly you want in userform ...

  14. #14
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Enter Userform Data into a range of Cells for Excel 2007

    Your post helped me out Naveed. I was just trying to expand my userform effeciency a bit. Ex. if "Isolation Point No" column has only 5 points (1,2,3,4,5) listed, then I only wanted the userform to enter data into rows 8,9,10,11,12.

  15. #15
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Enter Userform Data into a range of Cells for Excel 2007

    u mean to say if E5 cell has value "1" then enter data in Row 8 and if E5 cell has value 2 then in row 9 ...... and so on

    if E5 cell value reached to 6 then u dont want userform to enter data

  16. #16
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Enter Userform Data into a range of Cells for Excel 2007

    Close.....B8:B51 will auto populate from another sheet and will be labeled 1-44 in numerical order. They will only have a value if that amount is required. If I only have 6 points, then cell B8 will be a value of 1, B9 will be a value of 2, B10=3, B11=4 and so on.....Sooo if I have say 15 points, then B8:B22 will have a numeric value of 1-15 in numerical order; therefore I would want my userform to auto close once the 15th and final row of data is input onto the data sheet from my user form... I'm not sure if this can even be done? It would just be a nice feature to add. Thanks

  17. #17
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Enter Userform Data into a range of Cells for Excel 2007

    Close....B8:B51 will be numbered 1-44. The amount of numbered points will vary each time and will be automatically updated from another worksheet in the workbook. So B8=1, B9=2, B10=3, and so on. Example: If I have 6 points the B8:B13 will be numbered in numerical order from 1-6 (B8=1, B9=2.....B12=5, B13=6). I want my userform to stop entering data and close once the last row of data needed is added. So for this case I would need my userform to close once row 13's data has been added. Thanks. I don't even know if this is possible, but it would make my userform just a little more efficient.

+ 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. Enter data under specific Range (columns) via userform and combobox
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2014, 12:01 PM
  2. Copy Range and paste in an empty row below. Enter data via userform
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2013, 08:25 AM
  3. [SOLVED] I need excel 2007 vba coding to tab enter between regular cells and combo boxes
    By lmisrasi in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-07-2013, 01:57 AM
  4. need users to enter data from userform only, not directly into cells
    By bockwich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2012, 03:10 AM
  5. Help with a userform to enter data into cells in a matched row
    By luke8182 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-12-2012, 12:43 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