Ask Your Question
0

Copy cell colour if number match

asked 2019-06-20 13:20:35 +0200

scubafool gravatar image

I am using the below formula to see if, on one sheet the number matches on another one. What I also need to to copy to cell colour as well. Is that possible?

=IF(COUNTIF(Sheet2.A$1:$AK$99, E1)>0, TRUE,FALSE)

Thanks

edit retag flag offensive close merge delete

Comments

Standard calc functions do not copy anything from one cell to another but evaluate cell content based on references (to cells, ranges, ...) and other values (at least I'm not aware of any standard function to perform a copy). Hence no standard function copies a cells background colour to another. In fact it is even required to provide a custom function to evaluate the background colour of another cell.

Opaque gravatar imageOpaque ( 2019-06-20 13:55:23 +0200 )edit

The one first sheet is a map for pricing, the second is a filtered sheet with everything on the floor, filtered down from 12 pages to 3. What I need to do is try and figure out how to somehow she that certain cells on the first sheet need to use different labels. Any clue? I can change the cell to anything that will work.

scubafool gravatar imagescubafool ( 2019-06-20 14:21:46 +0200 )edit

Sorry, that's incomprehensible for me without a sample file and clear "if this on cell x, then cell y should show..."-descripition(s) what you exactly want to achieve. You start talking about background colours (I'd agree with @erAck 's answer) and now I just recognize a new term "labels" (which btw. doesn't tell me anything).

Opaque gravatar imageOpaque ( 2019-06-20 14:29:36 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2019-06-20 13:54:05 +0200

erAck gravatar image

No. But you can use conditional formatting to apply a style depending on the result (or any other formula). See help.

edit flag offensive delete link more

Comments

I have looked at conditional formatting but it seems it doesn't apply for what I need. I am seeing if the exact number is in another sheet, not with a certain range.

scubafool gravatar imagescubafool ( 2019-06-20 14:07:42 +0200 )edit

You can use conditional formatting to apply a colour to all exact matches, and a different colour (or no colour) to non matches. You cannot (easily?) pull the colour from another cell and use that within the sheet formula. If you were using a set colour palette for values on the other sheet you could apply the same colour palette to your conditional formatting, and this would achieve the same result albeit not in the manner you request.

It would be possible using macros, although reasonably non trivial.

johnsjs gravatar imagejohnsjs ( 2019-06-20 15:19:53 +0200 )edit
-2

answered 2019-06-20 14:06:46 +0200

alvingarrett gravatar image

Yeah, nice answer, i think its help for him!

edit flag offensive delete link more

Comments

This is not an answer, and it isn't a useful comment either. What's your intention?

Lupp gravatar imageLupp ( 2019-06-20 14:09:25 +0200 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2019-06-20 13:20:35 +0200

Seen: 33 times

Last updated: Jun 20