+ Reply to Thread
Results 1 to 3 of 3

Copy and paste cells data once another cells value meets a certain criteria

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    26

    Copy and paste cells data once another cells value meets a certain criteria

    Hi I was wondering if anybody is able to help me either add to this code or suggest some other to get over a slight issue I am having?

    I wish to copy an paste the value from cell B1 into cell C1 when the value in cell A1 = 1.

    Using the code below it works but I have two issues with it, first the value in A1 is attached to an external source which auto updates with different values throughout the day the only way the code below works is if you run the macro manually and the value in A1 is already 1 it will then copy and paste as I am away from the computer at times and the value could update for example from 34 to 1 whilst I am away I want the copy and paste to work automatically without me manually running the macro.

    The second issue is I need the code to do the same thing for cell A2,B2 & C2 all the way up-to cell A10,B10 & C10. The value 1 which triggers the copy and paste in the A cells will happen in different rows i.e. 2 then 3 at different times throughout the day.

    Any help would be greatly appreciated.

    Please Login or Register  to view this content.
    Regards
    Gally

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Copy and paste cells data once another cells value meets a certain criteria

    If I understand correctly then you want to detect when there is a change in the worksheet then take appropriate action. You need to install this code into the code module for Sheet1:
    Please Login or Register  to view this content.
    By the way, in VBA you can do this without using Copy & Paste, as seen above. Just assign the value from one cell to another.
    Last edited by 6StringJazzer; 12-28-2012 at 10:14 PM. Reason: added link for code install instructions
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copy and paste cells data once another cells value meets a certain criteria

    That has worked perfect.

    Thank you for your time and help 6StringJazzer - much appreciated.

    Kind Regards
    Gally

+ 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