Conditional formatting not working properly as one of the comparing cells contains a vlookup formula

Copper Contributor

Hi,

 

I'm having problems with a simple conditional formatting as one of the comparing values is a vlookup formula and not a number. 

 

I did the comparison with another set of data containing just numbers and not values and it works perfect.

 

 

Is there any way to let the conditional format know that we need to compare the values of column A with the values of column B which gets filled with a VLookup formula and then highlight the cells containing different values?

 

Please see the pictures.


2.PNGIn this case, the conditional format is working as Column Brand has been input manually typing the numbers and the red cells are those ones showing differences between Column Inventory and Column Brand.1.PNG

 

 

 

In this case, the conditional format is not working. Column Available inventory is filled as a result of a Vlookup formula. Column Inventory and Column Avail. Inv. are all red for some reason. I think this is because when the conditional formatting compares Columns Inventory with Avail, everything is different as Column Avail's cells contain a formula and not a value.

 

My comparing formula for the conditional format is very easy =$B2<>$H2 (Fill with red all cells from rows B and H with values are different from each other).

 

Does any one have an idea about this?

 

Does any one have had the same problem?

 

Does anyone knows how to solve this?

 

Thank you.

 

Odin.

 

2 Replies
Hi Odin,

You could try =VALUE($B2) <> VALUE($G2)

Hi Odin,

 

Conditional formatting, as any other formatting, definitely doesn't depend on how the cell receives its value, by formula or it was entered manually.

 

However, the formula could return not what we assume (e.g. text with some non-visible characters).

 

Another point is formatting. It looks like on your first screenshot both columns are formatted as text (green triangle on top left of each cell). For the next screenshot second column is not text (otherwise formula doesn't work) and you compare text in first column with number in second one.

 

That could be something else, without sample file attached with non-sensitive information we may discuss forever what could be possible reasons. But you my try one by one, start from Wyn's suggestion, most probably it works.