Time convertion based on condition
=LEFT(A1,MIN(IF(ISERROR(1*(MID(A1,ROW(INDIRECT("A1 :A"&LEN(A1))),1))),
ROW(INDIRECT("A1:A"&LEN(A1))),255))-1)*(IF(ISNUMBER(SEARCH("week",A1)),188,IF(ISNUMBER (SEARCH("day",A1)),24,1)))
this is an array formula, so commit with Ctrl-Shift-Enter
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Maglez" wrote in message
...
Hello.
How can I inspect cells which contain data like...
2 weeks
1 day
3.2 hours
and convert them all to hours as...
336 hours
24 hours
3.2 hours
I have been playing with the conditional IF and the text command SEARCH...
=IF(SEARCH("days",G4),1,0)
...but I am able only to perform 1 condition, I don't know if there is a
better approach to do this.
|