lynnnow
03-02-2007, 02:06 AM
Hi,
I've got a table with values that will be inserted and a vlookup at the right end of the table based on these values. I've used the worksheet_change event to set colors on these inserted values. The problem I have is that if the value is inserted in the vlookup cell then the function works, but if the values are inserted in the proper column, then the worksheet_change event does not trigger.
The code i've got so far is as below:
If Target.Column = 19 And Target.Value = "Austin" Then
ActiveSheet.Range("C" & Target.Row, "C" & Target.Row).Interior.ColorIndex = 3
I've 29 such values in the vlookup that need to be color coded.
http://vbaexpress.com/forum/C:%5CDocuments%20and%20Settings%5C5869.GTLCMS%5CDesktop%5Cvlookup.gifAs you will see from the snapshot (sorry it is minute), Col C gets the inserted values and Col S is the vlookup. The code as mentioned above works only if the location (in the above case "Austin") is inserted manually in Col S, otherwise it doesn't work.
Any help is appreciated.
Thanks in advance.
Lynnnow
I've got a table with values that will be inserted and a vlookup at the right end of the table based on these values. I've used the worksheet_change event to set colors on these inserted values. The problem I have is that if the value is inserted in the vlookup cell then the function works, but if the values are inserted in the proper column, then the worksheet_change event does not trigger.
The code i've got so far is as below:
If Target.Column = 19 And Target.Value = "Austin" Then
ActiveSheet.Range("C" & Target.Row, "C" & Target.Row).Interior.ColorIndex = 3
I've 29 such values in the vlookup that need to be color coded.
http://vbaexpress.com/forum/C:%5CDocuments%20and%20Settings%5C5869.GTLCMS%5CDesktop%5Cvlookup.gifAs you will see from the snapshot (sorry it is minute), Col C gets the inserted values and Col S is the vlookup. The code as mentioned above works only if the location (in the above case "Austin") is inserted manually in Col S, otherwise it doesn't work.
Any help is appreciated.
Thanks in advance.
Lynnnow