Vincent88
Active Member
- Joined
- Mar 5, 2021
- Messages
- 382
- Office Version
- 2019
- Platform
- Windows
- Mobile
Hi Guys,
I want to highlight those consecutive cells (till the end of that month only) in a row which meet the criteria in array. (Those cells with yellow highlight). Please help how to have the correct code to complete this task. I searched the web but with no luck to find any similarity to modifty.
I want to highlight those consecutive cells (till the end of that month only) in a row which meet the criteria in array. (Those cells with yellow highlight). Please help how to have the correct code to complete this task. I searched the web but with no luck to find any similarity to modifty.
TestDropDownList_2.xlsm | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | AH | AI | |||
1 | MDate | Attendance | 27-Jan | 28-Jan | 29-Jan | 30-Jan | 31-Jan | 1-Feb | 2-Feb | 3-Feb | 4-Feb | 5-Feb | 6-Feb | 7-Feb | 8-Feb | 9-Feb | 10-Feb | 11-Feb | 12-Feb | 13-Feb | 14-Feb | 15-Feb | 16-Feb | 17-Feb | 18-Feb | 19-Feb | 20-Feb | 21-Feb | 22-Feb | 23-Feb | 24-Feb | 25-Feb | 26-Feb | 27-Feb | 28-Feb | ||
2 | Date | Summary | (5) | (4) | (3) | (2) | (1) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | ||
3 | Larry Q | T:16 L:0.5 D:2.5 E:0 N:0 | D | D2 | K | G | G | G | G | D | N | D1 | D3 | D | G | E | N | N | AM | N | N | N | D | K | K | D | D | D2 | D2 | ||||||||
4 | Mandy H | T:16 L:0.5 D:3.5 E:0 N:0 | D2 | D | D | D | D | K | D | K | K | K | E | E | E | E | E | D | D1 | K | E | N | N | N | AL | AL | D | D | D | D | |||||||
202202 |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
A2 | List | =Data!$P$2:$P14 |
A3 | List | =Data!$P$2:$P$14 |
A4 | List | =Data!$P$2:$P$13 |
VBA Code:
Sub cellsOverFive()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim C As Range, rng As Range, rng1 As Range
Dim tArray As Variant
Set tArray = [("D","D1","D2","D3","D4","D5","G"."K","E","N")]
Application.DisplayStatusBar = False
Application.EnableEvents = False
Application.ScreenUpdating = False
Set rng = ws.Range("C3", ws.Range("AL" & Rows.Count).End(xlUp))
With rng.Cells
.Interior.xlPatternNone
End With
For Each C In rng
Next C
Application.DisplayStatusBar = True
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub