简体   繁体   中英

Highlight Formula Excel VBA

I am making an Event Manager with data in Column A60:A150 (Event Name) B60:b150(Start Date) and C60 to c150(End Date) D60 to D150(Place) when i am entering data in cells it appears event name in calendar

i want if value in Column D60:D150 ABC the dates should higlight green or any color

事件

As per image Red Bull should highlight Green and AAA should be other color if that Event Station/Place is different.

事件2

i use this formula

=D60:d150="ABC"

color green and select range B3:AF50 but it is only changing color of cell b3 not as per dates

Use this formula instead:

=VLOOKUP(B3,$A$60:$D$150,4,FALSE) = "ABC"

This will take the value in the cell and try to find it in the Range A60:A150. If it finds the value it will return the Station/Place. Then it tests if that equals "ABC" and returns True if it does.

If VLOOKUP Fails to find a match or that match does not equal "ABC", it will return False.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM