+ Reply to Thread
Results 1 to 2 of 2

Copy and paste row based on cell content

  1. #1
    BDan
    Guest

    Copy and paste row based on cell content

    I'm having trouble writing a macro that will copy a row of a table and paste
    it into another sheet based on if the contents of a single cell in the row
    contain a certain word.
    Thanks,
    BDan

  2. #2
    Die_Another_Day
    Guest

    Re: Copy and paste row based on cell content

    Sub CopyRow()
    Dim SingleCell as Range
    Set SingleCell = Range("A1")
    If InStr(1,SingleCell.Value,"certain word") > 0 Then
    SingleCell.EntireRow.Copy
    Sheets(2).Activate
    Cells(1,1).PasteSpecial xlPasteAll
    End Sub

    HTH

    Die_Another_Day

    BDan wrote:
    > I'm having trouble writing a macro that will copy a row of a table and paste
    > it into another sheet based on if the contents of a single cell in the row
    > contain a certain word.
    > Thanks,
    > BDan



+ 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