One cell input - multiple conditions and outputs.

Mikey556

New Member
Joined
Feb 9, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Good afternoon valued excel experts, I respectuflly request your help!

I am creating a spreadsheet for work. We have many employees who have an insane number of courses that must be completed throughout the year, all with varying expiry lengths (in days). I have tried to simplify with a basic mock spreadsheet to explain what we want to achieve (attached).

Situation: I input a date for 'Driver' course completion, for Jack in cell B9.

What I require from the spreadsheet from this one input:

  1. The B9 cell will immediately turn green, if in date (after checking certificate validity length in days from B5).
  2. The B9 cell will turn red, once it expires the 365 day limit, as dictated by B5.
  3. The B3 cell will check all dates in the 'driver' column (B9:B11) and show how many are in date (true?).
  4. The B3 cell will turn green/red, if the 'work requirement' (B1) is met/not met. (eg. we require 2 drivers at all times, all 3 employees are in date for driving certificate = cell turns green).
I hope I didn't make this too long winded. Any help would be HUGELY appreciated and I'll be eternally grateful.

Thankfully,

Mikey.

Book1
ABCDE
1Work Requirement →2133
2
3People Trained →
4
5Certificate Valid For (Days) →3653653030
6Certificate Name →DriverChefCleanerFirst Aid
7
8Employee ↓
9Jack
10James
11Jim
Sheet1
 

Attachments

  • Certifcate Expiry.jpg
    Certifcate Expiry.jpg
    151.7 KB · Views: 7
Last edited by a moderator:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I think this can be done with some conditional formatting and a countif. You can of course need to manipulate the ranges to suit and copy across but the below will work for your driver column....

create a conditional format for each of the below formula (if you're unsure how to google has good examples). Make sure the "$" are exactly as below
Excel Formula:
 =AND($B9<>"",TODAY()>$B9+$B$5) .... applies to =$B$3 ....format/fill to red
 =AND($B9<>"",TODAY()<$B9+$B$5) .... applies to =$B$3 ....format/fill to green
 =AND($B9<>"",TODAY()>$B9+$B$5).... applies to =$B$9:$B$11....format/fill to red
 =AND($B9<>"",TODAY()<$B9+$B$5).... applies to =$B$9:$B$11....format/fill to green

In cell B3 enter the following formula

Excel Formula:
=COUNTIF(B9:B11,">" & TODAY()-B5)
 
Last edited:
Upvote 0
Solution
I think this can be done with some conditional formatting and a countif. You can of course need to manipulate the ranges to suit and copy across but the below will work for your driver column....

create a conditional format for each of the below formula (if you're unsure how to google has good examples). Make sure the "$" are exactly as below
Excel Formula:
 =AND($B9<>"",TODAY()>$B9+$B$5) .... applies to =$B$3 ....format/fill to red
 =AND($B9<>"",TODAY()<$B9+$B$5) .... applies to =$B$3 ....format/fill to green
 =AND($B9<>"",TODAY()>$B9+$B$5).... applies to =$B$9:$B$11....format/fill to red
 =AND($B9<>"",TODAY()<$B9+$B$5).... applies to =$B$9:$B$11....format/fill to green

In cell B3 enter the following formula

Excel Formula:
=COUNTIF(B9:B11,">" & TODAY()-B5)
gordsky,

I cannot thank you enough! I managed the first few issues through hours of googling and work arounds, but came unstuck at the end. That COUNTIF line has really saved the day!

Consider this case closed and thanks again, you absolute Excel Wizard ?‍♂️!
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,692
Members
449,117
Latest member
Aaagu

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