+ Reply to Thread
Results 1 to 5 of 5

Move row based upon "IF" statement

  1. #1
    Registered User
    Join Date
    05-23-2006
    Posts
    15

    Move row based upon "IF" statement

    I need to cut an entire row and paste to another sheet within the workbook if the data in a specific cell equals the data in another cell. I need a macro that will check all rows for this condition and perform the cut and paste.

    Example: If C2 = C8, select row C and move to worksheet "2".

    Any help with this would be appreciated.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    Hi there,
    your question is confusing because you are mixing rows with columns

  3. #3
    Registered User
    Join Date
    05-23-2006
    Posts
    15
    let me try this

    If 2 cells (C2 and C5) are equal, I need to move that entire row to another sheet. If D2 and D5 are equal, move this entire row of data to another sheet, and so on.

    Basically, I need to select any row in which a certain condition is met and move it to another sheet.

    Thanks again for any help you can give.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    Quote Originally Posted by bpreas
    let me try this

    If 2 cells (C2 and C5) are equal, I need to move that entire row to another sheet. .........
    What row are you referring to that you want moved

  5. #5
    Registered User
    Join Date
    05-23-2006
    Posts
    15
    Man, do I feel dumb!! I guess you really CAN go brain dead after looking at numbers too long!

    I meant to say that if C2 and H2 are the same, move row 2. This needs to apply to any other row where the value in C and H are the same. And if it makes a difference, this sheet has been sub totaled using Columns O and R with "Summary below data" selected for those columns.

    I apologize for the confusion. No wonder I wasn't getting replies to this.

    Does this make better sense now?

    Sorry again.
    Last edited by bpreas; 07-20-2007 at 11:17 AM.

+ 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