Results 1 to 2 of 2

How to search, cut and paste using VBA

Threaded View

clwrs How to search, cut and paste... 08-12-2009, 05:07 PM
Leith Ross Re: How to search, cut and... 08-12-2009, 05:20 PM
  1. #1
    Registered User
    Join Date
    08-12-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    16

    How to search, cut and paste using VBA

    I am trying to alter my coding to accomplish a search, cut and paste function. I am trying to determine how I may be able to search out the first 3 numbers/letters in one cell and if it finds a cell with those, it will then cut the entire row and paste it into another page inside of the worksheet. Please let me know if the coding that I have done so far can be tweaked or if something else entirely different will be needed. Thanks for your help.

    ...
    Dim cell As Range
           
    With Sheets("Position")
    For Each cell In .Range("E2", .Range("E" & Cells.Rows.Count).End(xlUp))
    If Left(cell.Text, 3) = "995" Then
    cell.Copy Destination:=Sheets("CCY"). _
    Range("E" & Cells.Rows.Count).End(xlUp).Offset(1, 0)
    End If
    Next cell
    End With
    End Sub
    Last edited by clwrs; 08-13-2009 at 12:17 PM. Reason: Added Code Tags

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