help with formula
hi,
I want to calculated travelling cost depending on the days of travel. I have following data. (0-7)hrs-0$, (8-13)hrs-5$, (14-23)hrs-10$, 24hr-20$. Now suppose I started the travel on 12.05.08 at 16.38hrs and my journey ends on 16.05.08 at 11.30hrs, how can i calculate the money i am entitled to. I did it this way. *I used 24hrs time format in cell and subtracted 16.38hrs from it to get the no. of hrs of travel on first day. *Than i used the formula to calculate the (number of days between two dates)-1 to get the no.of days between the dates excluding first and second day. *Then I used 0:00+last day time to get the number of hrs for the last day. Note:I defined first and third cell in 13.30 time format. I dont know of its right to do that. *when i had no. of hrs in first cell, i tried to use and if statement to decide upon the money i am entitled to by using formula =IF(S2<8:00,0,IF(S2<14:00,5,IF(S2<24:00,10:00,20)) ) S2 is the the no. of hrs of travel i did on first day.its in 13.30 hr time format I defined this cell as number. and I am getting error. Can anyone help me with solution please. Thank you With Best Regards Sunny |
All times are GMT +1. The time now is 12:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com