Conditional Format Based on Week Input

KrisWain320

New Member
Joined
Feb 4, 2016
Messages
10
Hey All,

I was wondering if there was a way to conditionally format a cell based on if a certain row of information has been entered.

Put in more layman terms. I have a workbook which has a master sheet filled in daily. On this sheet I have a cell which I manually change it's background colour based on if a calibration has been run on a certain machine.

On another tab in this workbook i have a table where the results of said calibration are recorded against the week it was ran.
For example:

Low TolHigh TolZDVXDVYDVZDVYDVZDV
Week 1-0.150.151773.050.051105.080.08423.89-0.111773.010.01487.94-0.061773.570.05

<tbody>
</tbody>


Is there a way to set up a conditional formatting on the calibration cell that checks the current week number and then checks if the row for that week has been completed. If the data has not been input then the cell shows red. If the week's data has been input the cell shows green?

I've been trying to figure out how to do this without inputting a macro as i would like to avoid inserting another button into my worksheet for this action. The best i thought of was to generate an if statement in another cell that displays "yes" or "no" and then conditionally format based on this but i am unsure how to write said if statement.

Any help greatly appreciated.

Many Thanks
Kris
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
This is definitely possible but explaining it can be a little tricky especially when I'm assuming a lot of cell references.

For this, I'm going to assume that in your example above, the machine calibration data is in a Sheet called "MC1" and "MC2" and "MC3" etc.
I'm also assuming that Week 1 from your example above is in cell A2, Low Tol is in cell B1, High Tol in B2 etc. Your Z DV ends in O1
In your "Master Sheet", I'm going to assume "Week 1" is also in Cell A2, Week 2 in A3 and so on, and from B1, D1, E1, etc are the machine names which exactly match the names of each sheet.


So in the master sheet, in B1 is simply MC1 and cell A2 is Week 1; therefore B2 is where we want to know if the machine has had calibration data entered.

In B2, enter the following formula

=IF(VLOOKUP($A2,INDIRECT("'"&B$1&"'!A:O"),15,FALSE)="","No","Yes")

This looks at the week num in the Master, finds the relevant sheet based on the machine name, looks up the week and looks for data entered in Z DV (Column O) against that week.


Copy this formulae Down and then across, then do a conditional formula where "Yes"=Green and "No" = Red

You will have a lot of Red No's unless you have a date on your spreadsheet somewhere and build =today() into your formula.

If this doesn't make sense to you, feel free to send me the file and I'll sort it.
littleclubber@gmail.com
 
Upvote 0
This is definitely possible but explaining it can be a little tricky especially when I'm assuming a lot of cell references.

For this, I'm going to assume that in your example above, the machine calibration data is in a Sheet called "MC1" and "MC2" and "MC3" etc.
I'm also assuming that Week 1 from your example above is in cell A2, Low Tol is in cell B1, High Tol in B2 etc. Your Z DV ends in O1
In your "Master Sheet", I'm going to assume "Week 1" is also in Cell A2, Week 2 in A3 and so on, and from B1, D1, E1, etc are the machine names which exactly match the names of each sheet.


So in the master sheet, in B1 is simply MC1 and cell A2 is Week 1; therefore B2 is where we want to know if the machine has had calibration data entered.

In B2, enter the following formula

=IF(VLOOKUP($A2,INDIRECT("'"&B$1&"'!A:O"),15,FALSE)="","No","Yes")

This looks at the week num in the Master, finds the relevant sheet based on the machine name, looks up the week and looks for data entered in Z DV (Column O) against that week.


Copy this formulae Down and then across, then do a conditional formula where "Yes"=Green and "No" = Red

You will have a lot of Red No's unless you have a date on your spreadsheet somewhere and build =today() into your formula.

If this doesn't make sense to you, feel free to send me the file and I'll sort it.
littleclubber@gmail.com


Thank you for the response.

I appreciate the complexity of explaining it, i was struggling to explain the problem myself. I have followed through what you said and made some adaptions to match my spreadsheet but i seem to have gotten it working.

Other than altering the cell locations and rearranging some things in the workbook this has worked perfectly.

Many Thanks for your help
Kind Regards
Kris
 
Upvote 0

Forum statistics

Threads
1,215,227
Messages
6,123,738
Members
449,116
Latest member
alexlomt

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