Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Modify on this code... (2000 sr 1)

    i have this code it found a string, in this case:7049, is possible to insert other 2 string: 7050 and 7051...

    Sub COPY_LINE_INPS_49()

    Application.ScreenUpdating = False

    Dim i As Long, lastrow As Long
    lastrow = Sheets("RATE").Range("A65536").End(xlUp).Row
    For i = lastrow To 3 Step -1
    If Not Sheets("RATE").Rows(i).Find(What:="7049", LookIn:=xlValues, LookAt:=xlWhole) Is Nothing Then
    Sheets("RATE").Rows(i).Copy
    Sheets("RATE_INPS").Range("A3").EntireRow.Insert
    Sheets("RATE").Rows(i).Delete
    End If
    Next

    Application.ScreenUpdating = True

    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Modify on this code... (2000 sr 1)

    You can add similar conditions for the other two values and put Or between them:

    If Not Sheets("RATE").Rows(i).Find(What:="7049", LookIn:=xlValues, LookAt:=xlWhole) Is Nothing Or _
    Not Sheets("RATE").Rows(i).Find(What:="7050", LookIn:=xlValues, LookAt:=xlWhole) Is Nothing Or _
    Not Sheets("RATE").Rows(i).Find(What:="7051", LookIn:=xlValues, LookAt:=xlWhole) Is Nothing Then

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modify on this code... (2000 sr 1)

    sure i am stupid...
    Sorry me
    Tks Hans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •