Highlight Cells by duration

leekb248

New Member
Joined
Jul 6, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi

I am using this layout so I can see what time a students lesson is and how long it is, What i would like is when I insert the duration that the Cells fill to that duration so its easier to see and scedule other lessons
Annotation 2020-07-06 125220.png
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Is the below an option (it assumes that you are entering the name and start duration manually)?

Book1
ABC
1Time9th July 2020Duration
207:00  
307:30  
408:00  
508:30Abby Lesson02:00:00
609:00Abby Lesson01:30:00
709:30Abby Lesson01:00:00
810:00Abby Lesson00:30:00
910:30  
1011:00  
1111:30Mark Lesson03:00:00
1212:00Mark Lesson02:30:00
1312:30Mark Lesson02:00:00
1413:00Mark Lesson01:30:00
1513:30Mark Lesson01:00:00
1614:00Mark Lesson00:30:00
1714:30  
1815:00  
1915:30  
2016:00Jane Lesson01:00:00
2116:30Jane Lesson00:30:00
2217:00Fred Lesson02:00:00
2317:30Fred Lesson01:30:00
2418:00Fred Lesson01:00:00
2518:30Fred Lesson00:30:00
Sheet5
Cell Formulas
RangeFormula
B2:B4,B23:B25,B21,B12:B19,B6:B10B2=IF(A1="Time","",IF(C2<>"",B1,""))
C2:C4,C23:C25,C21,C12:C19,C6:C10C2=IF(C1="Duration","",IF(C1="","",IF(ROUND(C1,2)>TIMEVALUE("00:30"),C1-TIMEVALUE("00:30"),"")))
 
Upvote 0
Hi, sorry I forgot to mention that I would like it to fill with a colour rather than duplicate text
 
Upvote 0
That will probably need VBA if the time descending in column C isn't an option (might be able to do it with conditional formatting without the time descending in column C but I will have to think about that).
I might come back to it later if nobody else posts a solution.



I would like it to fill with a colour rather than duplicate text
P.S. the above is not how I interpreted the below part of the question from post #1
when I insert the duration that the Cells fill to that duration
 
Upvote 0
How about

+Fluff New.xlsm
ABC
1Time9th July 2020Duration
207:00:00
307:30:00
408:00:00
508:30:00Abby Lesson02:00:00
609:00:00
709:30:00
810:00:00
910:30:00
1011:00:00
1111:30:00Mark Lesson03:00:00
1212:00:00
1312:30:00
1413:00:00
1513:30:00
1614:00:00
1714:30:00
1815:00:00
1915:30:00
2016:00:00Jane Lesson01:00:00
2116:30:00
2217:00:00Fred Lesson02:00:00
2317:30:00
2418:00:00
2518:30:00
Main
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:C25Expression=OR($C2<>"",AND($C2="",LOOKUP(2,1/($C$2:$C2<>""),$A$2:$A2)+LOOKUP(2,1/($C$2:$C2<>""),$C$2:$C2)>$A2))textNO
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

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