With the xlookup function, can I also copy the cell color that is in the return-array ?

Copper Contributor

When using the xlookup function, I also want to copy the color of the cell in the return-array (hosting the value of my lookup)  together with the content of that cell. This to have the same color in my current range as the color for that cell in the return-array.

 

What are te possibilities ?  Alternate solutions ? 

3 Replies

@Walter_Verhoeven 

No, formulas only return a value.

If the cells in the lookup range are colored by conditional formatting, you can apply the same conditional formatting rules to the cell(s) with the formula.

Thx for your prompt reply.
Unfortunately, I cannot apply conditional formatting as the lookup range consists of imported data.
So, I will have to figure out something else instead of / or in conjunction with the xlookup formula.

@Walter_Verhoeven 

It is possible to use VBA code, but that might be overkill.