conditional formatting based cells if there are duplicate cells in a range

jbrown021286

Board Regular
Joined
Mar 13, 2023
Messages
76
Office Version
  1. 365
Platform
  1. Windows
danny copy shop calendar test.xlsx
ABCDEFGHIJKLM
1Shop ScheduleNovember 2024
2SUNDAYMONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAY
3Jeff's TeamJeffreyOpenThursday272829303112
4JoshOpenMondayRamyJoshAldoJeffJustinCarl3
5TuzzoCloseTuesdayCarlIsraelGerardoBrandunKedrinTuzzo4
6RamyOpenMondayCieraAngelBrayanTreQueAngel
7AldoCloseWednesday TuzzoDylanChrisJada
8Justin's TeamBrandunOpenThursday Alex PeterTionaMiguel
9IsraelCloseTuesday Tevin
10GerardoOpenWednesday Pat
11JustinCloseFriday3456789
12Carl's TeamAngelCloseTuesdayRamyJoshAldoJeffJustinJustin2
13KedrinOpenFridayCarlIsraelGerardoBrandunKedrinVenro5
14TreCloseThursdayCieraAngelBrayanTreQueBryan
15BrayanOpenWednesday TuzzoDylanChrisJada
16CarlOpenMonday Alex PeterTionaMiguel
17Used carsMiguelCloseSaturday Tevin
18VenroClose Saturday Pat
19TevinCloseSaturady10111213141516
20PatCloseSaturdayRamyJoshAldoJeffJustinJeff1
21ExpressQueOpenFridayCarlIsraelGerardoBrandunKedrinBrandun1
22DylanCloseWednesdayCieraAngelBrayanTreQue
23CieraCloseMonday TuzzoDylanChrisJada
24JadaOpenFriday Alex PeterTionaMiguel
25AlexCloseTuesday Tevin
26ChrisCloseThursday Pat
27TionaCloseFriday17181920212223
28PeterCloseThursdayRamyJoshAldoJeffJustinJeff1
29CarlIsraelGerardoBrandunKedrinRamy2
30CieraAngelBrayanTreQueAngel
31 TuzzoDylanChrisJada
32 Alex PeterTionaMiguel
33 Tevin
34 Pat
3524252627282930
36RamyJoshAldoJeffJustinCarl3
37CarlIsraelGerardoBrandunKedrinIsrael3
38CieraAngelBrayanTreQueAldo
39 TuzzoDylanChrisJada
40 Alex PeterTionaMiguel
41 Tevin
42 Pat
4312Notes
44
45
46
47
48
49
50
November
Cell Formulas
RangeFormula
G2:L2G2=UPPER(TEXT(G3,"dddd"))
F3:L3G3=DaysAndWeeks+DATE(CalendarYear,11,1)-WEEKDAY(DATE(CalendarYear,11,1),(WeekStart="Monday")+1)+1
G4:K10G4=teams!B23
L4,L36,L28,L20,L12L4=IF(M4=teams!$B$13,teams!$B$14,IF(M4=teams!$C$13,teams!$C$14,IF(M4=teams!$D$13,teams!$D$14,"")))
F1F1="November "&CalendarYear
F2F2=IF(WeekStart="SUNDAY", "SUNDAY","MONDAY")
F11:L11F11=DaysAndWeeks+DATE(CalendarYear,11,1)-WEEKDAY(DATE(CalendarYear,11,1),(WeekStart="Monday")+1)+8
G12:K18G12=teams!B23
L13,L37,L29,L21L13=IF(M13=teams!$B$5,teams!$B$6,IF(M13=teams!$C$5,teams!$C$6,IF(M13=teams!$D$5,teams!$D$6,IF(M13=teams!$E$5,teams!$E$6,IF(M13=teams!$F$5,teams!$F$6,"")))))
L14,L38,L30,L22L14=IF(M13=teams!$B$5,teams!$B$7,IF(M13=teams!$C$5,teams!$C$7,IF(M13=teams!$D$5,teams!$D$7,IF(M13=teams!$E$5,teams!$E$7,IF(M13=teams!$F$5,teams!$F$7,"")))))
F19:L19F19=DaysAndWeeks+DATE(CalendarYear,11,1)-WEEKDAY(DATE(CalendarYear,11,1),(WeekStart="Monday")+1)+15
G20:K26G20=teams!B23
F27:L27F27=DaysAndWeeks+DATE(CalendarYear,11,1)-WEEKDAY(DATE(CalendarYear,11,1),(WeekStart="Monday")+1)+22
G28:K34G28=teams!B23
F35:L35F35=DaysAndWeeks+DATE(CalendarYear,11,1)-WEEKDAY(DATE(CalendarYear,11,1),(WeekStart="Monday")+1)+29
G36:K42G36=teams!B23
F43:G43F43=DaysAndWeeks+DATE(CalendarYear,11,1)-WEEKDAY(DATE(CalendarYear,11,1),(WeekStart="Monday")+1)+36
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F3:K4,F5:F9,G5:G10,H4:K10Expression=DAY(F3)>8textNO
F43:H49Expression=AND(DAY(F43)>=1,DAY(F43)<=15)textNO
F35:L35,F37:F41,F36:K36,G37:K42Expression=AND(DAY(F35)>=1,DAY(F35)<=15)textNO
Cells with Data Validation
CellAllowCriteria
G2:L2Any value
H43:H50Any value
I43:L50Any value
F2Any value
F3:F9Any value
F10Any value
E1Any value
F1Any value
G1Any value

this is a schedule of peoples off days. i need a way to make the names not visible of the people that are off on Saturday of that week. i am thinking the best way to do that is by using a conditional formatting formula but need some help with making the formula to do that. in this example i would need to have cells G5, h7 and h6 in the first row of the calendar formatted. any help or ideas would be appreciated
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Your question is not at all clear.

How do these three things tie together?

- "duplicate cells in a range"
- "names not visible of the people that are off on Saturday", and
- cells G5, h7 and h6?
 
Last edited:
Upvote 0
The way I am thinking that it will best work is that I am going to conditional format each cell with a name in it that is in a Monday, Tuesday, Wednesday, Thursday and Friday block. So that when a cell has a matching name in the Saturday of that week the text in the weekday cell will be the same color as the background and not be readable. The only thing is I am trying to find the most efficient way of achieving the since I have to do it for all 52 week in the calendar. Does that make sense? Also if you have any other suggestions on how to achieve this i am open to ideas
 
Upvote 0
Yes, much clearer now, thanks. How about:

FGHIJKL
1Nov-24
2SUNDAYMONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAY
3272829303112
4RamyJoshAldoJeffJustinCarl
5CarlIsraelGerardoBrandunKedrinTuzzo
6CieraAngelBrayanTreQueAngel
7TuzzoDylanChrisJada
8AlexPeterTionaMiguel
9Tevin
10Pat
113456789
12RamyJoshAldoJeffJustinJustin
13CarlIsraelGerardoBrandunKedrinVenro
14CieraAngelBrayanTreQueBryan
15TuzzoDylanChrisJada
16AlexPeterTionaMiguel
17Tevin
18Pat
1910111213141516
20RamyJoshAldoJeffJustinJeff
21CarlIsraelGerardoBrandunKedrinBrandun
22CieraAngelBrayanTreQue
23TuzzoDylanChrisJada
24AlexPeterTionaMiguel
25Tevin
26Pat
2717181920212223
28RamyJoshAldoJeffJustinJeff
29CarlIsraelGerardoBrandunKedrinRamy
30CieraAngelBrayanTreQueAngel
31TuzzoDylanChrisJada
32AlexPeterTionaMiguel
33Tevin
34Pat
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G3:K34Expression=LET(N,8,Sat,$L$3:$L$34,f,FLOOR(ROWS(G$3:G3)-1,N),ISODD(f/N)*ISNUMBER(MATCH(G3,OFFSET(INDEX(Sat,1+f),,,N),)))textNO
G3:K34Expression=LET(N,8,Sat,$L$3:$L$34,f,FLOOR(ROWS(G$3:G3)-1,N),ISEVEN(f/N)*ISNUMBER(MATCH(G3,OFFSET(INDEX(Sat,1+f),,,N),)))textNO

I've used red and green font just to show better what's happening. You'll want to change this to the background colours white and grey.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,630
Messages
6,173,451
Members
452,514
Latest member
cjkelly15

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