+ Reply to Thread
Results 1 to 8 of 8

Copy Cell values based on conditional formatting

  1. #1
    Registered User
    Join Date
    11-17-2016
    Location
    canitz centro
    MS-Off Ver
    2013
    Posts
    3

    Copy Cell values based on conditional formatting

    Please could someone help,

    I have conditionally formatted a range of cells in a column based on another column to highlight duplicates.

    I would now like to copy all of the highlighted values to another column in the same row - can this be done by VBA or using a formula to determine acknowledge the CF and copy/paste the cell value not the fomula?

    Thanks in advance!!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Copy Cell values based on conditional formatting

    Fast Answer..................No, Excel and VBA know nothing about the conditional format of any cell.

    The good news is that you have your conditional formulas, so you can use them to drive your Macro or your formula.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    11-17-2016
    Location
    canitz centro
    MS-Off Ver
    2013
    Posts
    3

    Re: Copy Cell values based on conditional formatting

    Thank you very much for replying so quickly, it is quite urgent!!

    Please see the test workbook enclosed, I hope this clarifies my question, if you require any further info let me know.

    Liam
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,704

    Re: Copy Cell values based on conditional formatting

    If you want the value (not formula which gives you the value) you will need VBA:

    =IFERROR(IF(MATCH($C2,$I$3:$I$24,0),$C2,""),"")


    Above is the formula required in G2 and copy down

  5. #5
    Registered User
    Join Date
    11-17-2016
    Location
    canitz centro
    MS-Off Ver
    2013
    Posts
    3

    Re: Copy Cell values based on conditional formatting

    Hi I put the formula in G2 and nothing happened, the cells are still blank?

    Liam

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Copy Cell values based on conditional formatting

    Right Click on your sheet name at the bottom of excel and select view code.

    Paste this code in the window that opens and close it.

    select another sheet on the spreadsheet and then select your spreadsheet, this will run a macro to fill all rows in column g.

    changing cells in column C or column I will also run the macro.

    '************************************************************************************

    NB Your Spreadsheet is set to manual calculate so Johns formula does not work automatically.

    '************************************************************************************


    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Copy Cell values based on conditional formatting

    Liam: Have you tried applying a filter by color to the column?
    Apply the filter using the CF color you want to copy. Highlight the cells you want to copy. F5 (go to). Special. Visible cells only. Copy. You can open a new sheet if you like. . (CTRL + N). Paste special. Values.

    Pete

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,704

    Re: Copy Cell values based on conditional formatting

    Did you ..??

    Above is the formula required in G2 and copy down
    Attached Files Attached Files

+ 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] Conditional Formatting Based on Cell Values
    By SalientAnimal in forum Excel General
    Replies: 8
    Last Post: 10-26-2016, 03:24 AM
  2. Please help: conditional formatting based on two cell values!
    By DanniMc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2016, 01:57 PM
  3. Help with conditional formatting based on cell values
    By ExcelIsTheWayForward in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-26-2015, 07:41 AM
  4. [SOLVED] Conditional formatting based on two cell values
    By Thinker8 in forum Excel General
    Replies: 7
    Last Post: 09-22-2013, 12:50 AM
  5. Conditional Formatting based on 3 different cell values
    By Stephen.Birch in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-21-2013, 10:16 AM
  6. Conditional Formatting based on cell values
    By nickbrandon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2013, 08:26 AM
  7. [SOLVED] conditional formatting based on values of another cell
    By annysjunkmail@tiscali.co.uk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2005, 04:05 AM

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