• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Conditional Formatting during VLOOKUP

rbobcat1

Member
is there a way when using VLOOKUP to throw in conditional formatting?


example if i have a lookup and it finds the item is there a way to color code that item that it found?
 
Hi, rbobcat1!


Assume your data starts in A1:

[pre]
Code:
Code	Name
1	A
2	BB
4	CCC
8	DDDD

Code:	4
Name:	CCC
[/pre]
Cell B8 (last) has:

=SI(ESBLANCO(B7);"";BUSCARV(B7;A1:B5;2;FALSO)) -----> in english: =IF(ISBLANK(B7),"",VLOOKUP(B7,A1:B5,2,FALSE))


For range B1:B5, you may write this as CF:

=B1=B$8


This will highlight cell B4.

But... and there's a but...

It would highlight all other table value in B column that is equal to the found one.


For the moment, I don't imagine any other solution.


Regards!
 
Hi, rbobcat1!

Just found a workaround. Change the CF to:

=Y(B$7=A1;B$8=B1) -----> in english: =AND(B$7=A1,B$8=B1)

Regards!
 
Back
Top