Macro to Change Colour According to Four Initials Before

WithaWhy

New Member
Joined
Apr 15, 2013
Messages
1
Hello there,

In my work my boss has asked me to create a spreadsheet changes colour according to who's initials are entered into the box for each of the five processes in our team. This I have managed using "Coniditional Formatting in Excel 2007".

However now what he also is asking is that when a person's initials are entered five times in a row he wants it to highlight those four cells black to show that this person has worked on the process for four weeks and is not able to work on it again for another four weeks (minimum). But obviously he wants this for each member on the team.

I have been unable to get a coniditional "COUNTIF" formula to work correctly and assume given this is quite an advance task I assume I need a Visual Basic macro and I am not too competent, can anyone provide advice?

Due to being at work I cannot upload a screenshot of how my spreadsheet looks but for instance.

Row A6, A10, A14, A18 and A22 is where Processes headings are and each column from B6, B10, B14, B18 and B22 are the weeks so each member of staff should work something in A6 for four cells in a row and then if someone tries to add their initials again it'll turn the cells black to show this person shouldn't be getting used again. But in any time AFTER the first four weeks doing the process they can do it again. It's basically a rotation I need to get to work.

The formula (for instance) that I had used isn't advance enough to realise that entering something five times or more is fine if they've went over five weeks. The formula I used was:

=COUNTIF($B$22:$BE$22, "AW")>4

Can anyone help me with this?

Thanks in advance (I'll upload a copy of my spreadsheet outside of work tonight).

WithaWhy
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,002
Office Version
  1. 365
  2. 2016
Try these CFs, for initial colour

=B22="AW"

for over 5 try

=AND(B22="AW", COUNTIF($B$2:$BE$22, "AW")>5)
 

Watch MrExcel Video

Forum statistics

Threads
1,123,119
Messages
5,599,821
Members
414,341
Latest member
Mohammedsobhey

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
Top