When you say highlighted are you referring to fill colour? Is there a condition linked to cells that are highlighted? A formula cannot determine cell formatting but it can determine (test for) the value of the cell, so if the colour is due to some condition on the value in the cell the IF() function can work by testing the value of the cell without the need to test the colour. Can you provide more info regarding this?
Conditional formating (already set up) I have two sets of data. If an ID in data set 1 appears in data set 2, then the row in data set 1 gets highlighted.
I then want to take the last column in data set 1 (we'll call it column F), which contains numbers, to be copied to the next column (column G) only if that column F is highlighted (via the conditional formatting). Here is an image:
I believe that answers my question. Thank you RudiS. Perhaps you can assist in another problem I have (last one, lol). It's actually figuring out the proper conditional formatting that relates to this question. You've helped me figure out the 2nd half to my problem.
Based on the image in the Excel forum you can try a formula like this in the conditional formatting feature.
G5:G11 are the unique ID numbers. (I recommend that this list contain the ACTUAL "cleaned up" ID numbers WITHOUT any leading zeros.)
RIGHT($B5,7) is the value to search for in range G5:G11
COUNTIF is the condition. If a match is found the logic is >0 and the condition is TRUE
The confition can be applied to the whole table to highlight the row where a match is found, or to the single ID column to highlight only the ID.