Results 1 to 9 of 9

Copy specific range from sheet to another if condition in cell met

Threaded View

  1. #1
    Registered User
    Join Date
    01-28-2012
    Location
    Pune, India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Exclamation Copy specific range from sheet to another if condition in cell met

    Hello Guys..I am new to this forum and have seen a lot of VBA questions answered here. I would like an answer to one of my own issues.

    I have attached a sample excel sheet with certain formulas for specific columns.
    Following is my basic requirement : I want to copy a specific range, instead of complete row and paste it into another sheet if a condition is met in column.
    In this forum I only found examples of copying a row and pasting into another sheet.

    For example, in the workbook provided, "JAN-12" sheet has the data with formula in H column.
    "DELIVERY" sheet has corresponding columns with last 2 columns having formula in them.

    When I use the
    Cell.EntireRow.Copy
    it will copy the entire row and paste entrie row too as per paste code
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
    But this will remove any formulas that I have set in the last 2 columns and also paste "Rejection details" columns from Jan-12 sheet to Delivery sheet.

    Kindly help with a macro code that will copy only the first 10 columns to another sheets for the corresponding cell in which criteria is met.

    *criteria : If "Status" column has "C" then data from first 10 columns in that row should be copied to "Delivery" sheet.

    Hope this makes sense...open to any queries.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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