+ Reply to Thread
Results 1 to 8 of 8

Macro: copy column value to another sheet based on criteria

  1. #1
    Registered User
    Join Date
    03-30-2015
    Location
    London
    MS-Off Ver
    2021
    Posts
    41

    Macro: copy column value to another sheet based on criteria

    Hi guys,

    I am very new to VBA and I am trying to work out a macro code which would do the following : for example I have values in Column A and percentages in Column B, and I need to copy only the percentages ( excl formatting) from column b if there is a value in column A and paste it in sheet 2 , in the Column B, if there is a same value in column A ? if there is no value, do not copy anything ., column will have blanks.

    Many thanks,

    Aiva

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro: copy column value to another sheet based on criteria

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: Macro: copy column value to another sheet based on criteria

    Oops John made it quickly
    Last edited by Parth007; 08-20-2015 at 06:48 AM.
    Regards
    Parth

    I appreciate your feedback. Hit * if u Like.
    Rules - http://www.excelforum.com/forum-rule...rum-rules.html

  4. #4
    Registered User
    Join Date
    03-30-2015
    Location
    London
    MS-Off Ver
    2021
    Posts
    41

    Re: Macro: copy column value to another sheet based on criteria

    Thank you so much for code provided, I am getting an error subcsript out of range, is there anything that I need to edit in this code?

    Many thanks,

    Aiva

  5. #5
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: Macro: copy column value to another sheet based on criteria

    Hey Check this Code provided by John.. it doesnt give error..
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro: copy column value to another sheet based on criteria

    Quote Originally Posted by Alcotraz View Post
    Thank you so much for code provided, I am getting an error subcsript out of range, is there anything that I need to edit in this code?

    Many thanks,

    Aiva
    You need to run with Sheet1 activated of the copy from sheet. You also need a Sheet named Sheet2. Check your Sheet names and advise.

  7. #7
    Registered User
    Join Date
    03-30-2015
    Location
    London
    MS-Off Ver
    2021
    Posts
    41

    Re: Macro: copy column value to another sheet based on criteria

    It looks ok when I add in the test sheet, but when I want to apply to my orginal sheet it comes as an error, but I will have a look at this later.

    But I found an issue with values, if the cell is formated as currency, or percentage, ir doesnt copy over, also, if there is text somewhere in column A, after the text row it stops copying the percentages too..

  8. #8
    Registered User
    Join Date
    03-30-2015
    Location
    London
    MS-Off Ver
    2021
    Posts
    41

    Re: Macro: copy column value to another sheet based on criteria

    It might be easier to understand for you guys if I submit an original sheet.

    Please find attachment below.

    So the goal is , from sheet 6, Column G , once I press button CERT.DONE. , those percentages to copy over in sheet4 for the same items as per Sheet6 in Column G , and delete contents in column H. keeping the same format, so only values( percentages)

    http://docdro.id/bIDyxVo

    Many thanks,

    Aivaras

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to copy row from one sheet to another based on criteria
    By jack.stapleton in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-17-2015, 10:45 PM
  2. [SOLVED] Copy/Paste a column in a new sheet based on a criteria
    By Elorac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2013, 02:01 PM
  3. Replies: 0
    Last Post: 07-16-2013, 05:22 AM
  4. Macro to copy row title to a different sheet based on multiple column criteria
    By Steveb03 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-05-2012, 04:24 PM
  5. [SOLVED] Calculate total of a column, based on criteria and copy to another sheet
    By luke.guthrie in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 06-01-2012, 05:59 PM
  6. Need Macro to search from mater sheet and copy in another sheet based on Criteria
    By humacdeep in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-29-2012, 01:03 PM
  7. Copy Cells to another sheet based column criteria
    By Newfibot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-06-2011, 01:29 PM

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