+ Reply to Thread
Results 1 to 2 of 2

Enter Data from userform into cells starting from specific cell

Hybrid View

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

    Enter Data from userform into cells starting from specific cell

    I need to add something to the code below to have my first row of data entered into cell "Q8". As it is now the data is starting on row Q9 instead of Q8, but the rest of it is filling in correctly.

    Dim RowCount As Long, sht As Worksheet
    Set sht = Sheets("WorkSheet-1")
    
    With sht
        'RowCount = .Range("A" & .Rows.Count).End(xlUp).Row + 1
            If .Range("A8").Value = "" Then
                RowCount = 8
            ElseIf .Range("A8").Value <> "" And .Range("A9").Value = "" Then
                RowCount = 9
            Else
                RowCount = .Range("A8").End(xlDown).Row
                
            End If
            .Range("A" & RowCount).Offset(0, 16) = Me.ComboBox_IsoMethodSelected.Value
    End With
    Thanks for your help

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Enter Data from userform into cells starting from specific cell

    Your code worked fine when I ran it, though it seems more complicated than necessary. The following does the same thing, assuming A7 or A8 will have a value:
    Dim RowCount As Long
    With Sheets("Worksheet-1")
        RowCount = .Range("A" & .Rows.Count).End(xlUp).Row + 1
        .Range("Q" & RowCount).Value = Me.ComboBox_IsoMethodSelected.Value
    End With
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

+ 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. Userform to enter data to specific cell + more
    By steve_from_the_uk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-03-2013, 03:52 PM
  3. Replies: 3
    Last Post: 09-20-2013, 04:24 PM
  4. 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
  5. Enter text into a specific cell using a userform
    By Cushionsupplier in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2010, 05:38 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