Calculating time, I think

steve astrop

New Member
Joined
Nov 18, 2002
Messages
23
Hi, not posted for a while, stuck and hope someone knowledgeable can assist. I have created a spreadsheet to show how busy our car park is with shift patterns. I would like to highlight with conditional formatting the first and last entry where the total spaces exceed a specific number for that time. The formula below works (I think) for most shift patterns but when the shift starts before and ends after midnight it doesn't. The data is on the attached sheet Spaces_Data Tab. As I said, not posted for a long time, apologies if

=IF(B2<1,"",IF(OR(B1<$AA$2,B1>$AB$2,),IF(B6>50,TRUE,"1")))

Car park Calculations.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABB
100:0000:3001:0001:3002:0002:3003:0003:3004:0004:3005:0005:3006:0006:3007:0007:3008:0008:3009:0009:3010:0010:3011:0011:3012:0012:3013:0013:3014:0014:3015:0015:3016:0016:3017:0017:3018:0018:3019:0019:3020:0020:3021:0021:3022:0022:3023:0023:30Start TimeEnd Time
2Shift 1All Day22222222222222222222222222222222222222222222222200:0023:59
3Shift 2Day             454545454545454545454545454545454545454545454545454545        07:0019:00
4Shift 3Night23232323232323232323232323232323                     232323232323232323232319:0007:00
Spaces Data
Cell Formulas
RangeFormula
B2:B4B2='Home page'!B4
C2:AX2C2=IF(MOD(1+'Spaces Data'!C1-'Home page'!$E$4,1)=MAX(MOD(1+'Spaces Data'!C1-'Home page'!$E$4,1),MOD(1+'Spaces Data'!C1-'Home page'!$F$4,1)),"",'Home page'!$I$4)
C3:AX3C3=IF(MOD(1+'Spaces Data'!C1-'Home page'!$E$5,1)=MAX(MOD(1+'Spaces Data'!C1-'Home page'!$E$5,1),MOD(1+'Spaces Data'!C1-'Home page'!$F$5,1)),"",'Home page'!$I$5)
C4:AX4C4=IF(MOD(1+'Spaces Data'!C1-'Home page'!$E6,1)=MAX(MOD(1+'Spaces Data'!C1-'Home page'!$E$6,1),MOD(1+'Spaces Data'!C1-'Home page'!$F$6,1)),"",'Home page'!$I$6)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C4:AX4Expression=IF(C4>1,IF(AND(OR(C1<$BA$4,C1>$BB$4,), C30>330),TRUE, ""),FALSE)textNO
C3:AX3Expression=IF(C3>1,IF(AND(OR(C1<$BA$3,C1>$BB$3,), C30>330),TRUE, ""),FALSE)textNO
C2:AX2Expression=IF(C2>1,IF(AND(OR(C1<$BA$2,C1>$BB$2,), C30>300),TRUE, ""),FALSE)textNO
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Calculating Time?
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,958
Members
449,096
Latest member
Anshu121

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