![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 752
|
I want to do an if formula for elasped time. If 20 minutes have passed I want "1" to appear 40 minutes "2", 60 minutes "3" and so on.
I have the elasped time thing done. But I can't seem to get the if function to work, can someone please help. Thanks. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Use =TRUNC(A1/20) where A1 contains your elapsed time as minutes. If A1 contains a time value (e.g., 0:20) use =TRUNC(A1*72). An IF function isn't necessary.
[ This Message was edited by: Mark W. on 2002-03-21 08:53 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
|
You did not state if cell contained number or time. with number =INT(A48/20)*1 with time =INT(MINUTE(A50)/20)*1 |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
What does the "*1" do? [ This Message was edited by: Mark W. on 2002-03-21 09:21 ] |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
|
OK
revise to numbers =INT(A48/20) times =INT(MINUTE(A50)+HOUR(A50)*60)/20 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|