Vlookup with color

A_K

New Member
Joined
Mar 12, 2013
Messages
8
Hi,

I have two lists. The first lists has colored cells in front of some of the items on the list. Is there a way for excel to look up whether the cell in front of an item is colored in the first list, and if yes, to apply a [different] color to a cell next to the same item in the second list? please see the example screenshot.

581473_4658967152251_899543226_n.jpg


Thank you for your help!
A_K
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Yes you can do it but wit VBA..
Try below code in sample work book hope it will works

Code:
Sub Mn()

Dim rcnt As Long
rcnt = Worksheets(1).Range("A" & Rows.Count).End(xlUp).Row

For i = 2 To rcnt

 If Range("A" & i).Value <> "" And Range("B" & i).Interior.ColorIndex <> xlNone Then
    Range("F" & i).Interior.ColorIndex = 10 ' change color code
 End If
 
 Next i
 
 
End Sub


Thanks
A
 
Upvote 0
Thank you, this worked when the order of the items in List 1 and List2 was the same.

But I have also tried changing the order (i.e., not a, b, c, d, but instead ordered randomly) in List2, in which case the colors were appearing not in front of the cells with corresponding values, but just were in front of the items in the same rows in List 2.

483316_4664920981093_1329751510_n.jpg
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top