I haven't been here for years. Hi to the ones that
may remember me.
I need some help taking a formula I created and turning it into a function. After attempting a few times, I decided I needed help.
My formula looks like:
Code:
=IF(TEXT(endTime-startTime,"h:mm")<="1:00",
IF(TEXT(endTime-startTime,"h:mm")="1:00","1 hour",Minute(endTime-startTime)&"min"),
TEXT(endTime-startTime,"h"&" \hour\s "&"mm"&"\m\i\n"))
I am not sure if I need to cast the format that much. The formula checks if the start and end times are greater than one hour. If it isn't, see if the period is 0-59 min, if so say xx min. If the period is exactly 1 hour, print "1 hour". If the period is greater than 1 hour, print x hours y minutes.
I am using excel 2010 if it means anything.