+ Reply to Thread
Results 1 to 6 of 6

range find data and write to adjacent cell

  1. #1
    Registered User
    Join Date
    10-23-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    range find data and write to adjacent cell

    I have a userform that finds the result of combo box then writes the data from the textbox to a worksheet. it works except the when i run the userform again it overwrites the previous data instead of finding the next blank column adjacent to the found value.

    Private Sub CommandButton5_Click()
    Dim rFind As Range
    Dim lastcolumn As Integer

    With Sheets("ap2").Columns(1)
    Set rFind = .Find(What:=Me.ComboBox2.Value, LookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)
    rFind.Offset(, 1).Value = Me.TextBox17.Value

    End With

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: range find data and write to adjacent cell

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-23-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: range find data and write to adjacent cell

    Thanks alphafrog, but it still is not finding the next empty column when i find the same row the next time it just says no match found...any thoughts?

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: range find data and write to adjacent cell

    Is the next match an exact match? No unseen trailing spaces or extra characters.

    Could you post an example workbook?

  5. #5
    Registered User
    Join Date
    10-23-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: range find data and write to adjacent cell

    FSETT 2013 Q1 (version 2).xls

    It is an exact match, Thanks again for your help!

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: range find data and write to adjacent cell

    I misunderstood what you wanted. Try this...

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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