+ Reply to Thread
Results 1 to 2 of 2

Range Selection-how will i take the range from the string found "row"?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-08-2007
    Posts
    15

    Range Selection-how will i take the range from the string found "row"?

    M finding some string like "DATE" in excel sheet
    Cells.Find("d a t e", LookIn:=xlValues)
    how will i take the range from the string found "row"
    to the end of the row.
    plz tell me i wil b very greatful to u

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can use this code:

    Sub Macro1()
       Set f = Cells.Find("d a t e", LookIn:=xlValues)
       If Not f Is Nothing Then
          lastColumnInRow = Cells(f.Row, Columns.Count).End(xlToLeft).Column
          Range(Cells(f.Row, f.Column), Cells(f.Row, lastColumnInRow)).Select
       End If
    End Sub
    I hope it can help you

    Regards,
    Antonio

+ 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