Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default N/A results on vlookup with time calculations

My worksheet calculates my timesheet. Each day I enter the time in and the
time out. The difference gets rounded to the nearest quarter of an hour each
day.
(I later add up all the days and do all sorts of other calcs...not important
to this question).

I figure out the rounding by using vlookup with the following formula:
=IF(D9-C90,INT((D9-C9)*24)+VLOOKUP(((D9-C9)*24-INT((D9-C9)*24)),$B$77:$C$81,2),0)

here is the data in b77:c81
0 0
0.13 0.25
0.38 0.5
0.63 0.75
0.88 1

This has been working fine for 2 months now. But, today my time in was
9:00AM and my timeout was 1:00PM and the result was N/A !!!! It works for
9:00 to 1:01 and for 9:00 to 12:00 and for any other combo in the past 2
months.

When I tried stepping throught the formula, it came up to a step doing 4-4
and then came up with the following result to that calc:
-8.88178419700125E-16 !!

I am totally perplexed... Will appreciate help on this one.
I am pretty much a self-taught excel novice...please take that into
consideration when responding. Thanks




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default N/A results on vlookup with time calculations

Look here to learn what happened
--
Kind regards,

Niek Otten
Microsoft MVP - Excel
and how to cure this:

http://support.microsoft.com/kb/78113


"Freida" wrote in message ...
| My worksheet calculates my timesheet. Each day I enter the time in and the
| time out. The difference gets rounded to the nearest quarter of an hour each
| day.
| (I later add up all the days and do all sorts of other calcs...not important
| to this question).
|
| I figure out the rounding by using vlookup with the following formula:
| =IF(D9-C90,INT((D9-C9)*24)+VLOOKUP(((D9-C9)*24-INT((D9-C9)*24)),$B$77:$C$81,2),0)
|
| here is the data in b77:c81
| 0 0
| 0.13 0.25
| 0.38 0.5
| 0.63 0.75
| 0.88 1
|
| This has been working fine for 2 months now. But, today my time in was
| 9:00AM and my timeout was 1:00PM and the result was N/A !!!! It works for
| 9:00 to 1:01 and for 9:00 to 12:00 and for any other combo in the past 2
| months.
|
| When I tried stepping throught the formula, it came up to a step doing 4-4
| and then came up with the following result to that calc:
| -8.88178419700125E-16 !!
|
| I am totally perplexed... Will appreciate help on this one.
| I am pretty much a self-taught excel novice...please take that into
| consideration when responding. Thanks
|
|
|
|


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default N/A results on vlookup with time calculations

To round time, since XL stores times as fractional days and there are 96
quarter hours per day, one way

=ROUND((D9-C9)*96,0)/96

Format as time.

Your VLOOKUP() problem is due to small rounding errors inherent in the
way XL and most other spreadsheets store and calculate data. See

http://cpearson.com/excel/rounding.htm

for more

Format as In article
,
Freida wrote:

My worksheet calculates my timesheet. Each day I enter the time in and the
time out. The difference gets rounded to the nearest quarter of an hour each
day.
(I later add up all the days and do all sorts of other calcs...not important
to this question).

I figure out the rounding by using vlookup with the following formula:
=IF(D9-C90,INT((D9-C9)*24)+VLOOKUP(((D9-C9)*24-INT((D9-C9)*24)),$B$77:$C$81,2
),0)

here is the data in b77:c81
0 0
0.13 0.25
0.38 0.5
0.63 0.75
0.88 1

This has been working fine for 2 months now. But, today my time in was
9:00AM and my timeout was 1:00PM and the result was N/A !!!! It works for
9:00 to 1:01 and for 9:00 to 12:00 and for any other combo in the past 2
months.

When I tried stepping throught the formula, it came up to a step doing 4-4
and then came up with the following result to that calc:
-8.88178419700125E-16 !!

I am totally perplexed... Will appreciate help on this one.
I am pretty much a self-taught excel novice...please take that into
consideration when responding. Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default N/A results on vlookup with time calculations

Thank you. If I understood all this correctly I had to make my ss calcs less
precise.
I did that and now it is working.

"Niek Otten" wrote:

Look here to learn what happened
--
Kind regards,

Niek Otten
Microsoft MVP - Excel
and how to cure this:

http://support.microsoft.com/kb/78113


"Freida" wrote in message ...
| My worksheet calculates my timesheet. Each day I enter the time in and the
| time out. The difference gets rounded to the nearest quarter of an hour each
| day.
| (I later add up all the days and do all sorts of other calcs...not important
| to this question).
|
| I figure out the rounding by using vlookup with the following formula:
| =IF(D9-C90,INT((D9-C9)*24)+VLOOKUP(((D9-C9)*24-INT((D9-C9)*24)),$B$77:$C$81,2),0)
|
| here is the data in b77:c81
| 0 0
| 0.13 0.25
| 0.38 0.5
| 0.63 0.75
| 0.88 1
|
| This has been working fine for 2 months now. But, today my time in was
| 9:00AM and my timeout was 1:00PM and the result was N/A !!!! It works for
| 9:00 to 1:01 and for 9:00 to 12:00 and for any other combo in the past 2
| months.
|
| When I tried stepping throught the formula, it came up to a step doing 4-4
| and then came up with the following result to that calc:
| -8.88178419700125E-16 !!
|
| I am totally perplexed... Will appreciate help on this one.
| I am pretty much a self-taught excel novice...please take that into
| consideration when responding. Thanks
|
|
|
|



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default N/A results on vlookup with time calculations

Thank you for your response; it is good to understand how the time is stored
for future worksheet calcs.

"JE McGimpsey" wrote:

To round time, since XL stores times as fractional days and there are 96
quarter hours per day, one way

=ROUND((D9-C9)*96,0)/96

Format as time.

Your VLOOKUP() problem is due to small rounding errors inherent in the
way XL and most other spreadsheets store and calculate data. See

http://cpearson.com/excel/rounding.htm

for more

Format as In article
,
Freida wrote:

My worksheet calculates my timesheet. Each day I enter the time in and the
time out. The difference gets rounded to the nearest quarter of an hour each
day.
(I later add up all the days and do all sorts of other calcs...not important
to this question).

I figure out the rounding by using vlookup with the following formula:
=IF(D9-C90,INT((D9-C9)*24)+VLOOKUP(((D9-C9)*24-INT((D9-C9)*24)),$B$77:$C$81,2
),0)

here is the data in b77:c81
0 0
0.13 0.25
0.38 0.5
0.63 0.75
0.88 1

This has been working fine for 2 months now. But, today my time in was
9:00AM and my timeout was 1:00PM and the result was N/A !!!! It works for
9:00 to 1:01 and for 9:00 to 12:00 and for any other combo in the past 2
months.

When I tried stepping throught the formula, it came up to a step doing 4-4
and then came up with the following result to that calc:
-8.88178419700125E-16 !!

I am totally perplexed... Will appreciate help on this one.
I am pretty much a self-taught excel novice...please take that into
consideration when responding. Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time difference calculations, daylight savings time, Excel Tim Excel Discussion (Misc queries) 1 December 28th 06 04:18 PM
Copying formulas without changing previous results/calculations kate_suzanne Excel Worksheet Functions 6 August 28th 06 03:46 AM
Simple, yet complex problem! Using results as new data during calculations? S Davis Excel Worksheet Functions 2 June 30th 06 09:11 PM
Help on performing calculations on formula results AussieExcelUser Excel Worksheet Functions 3 March 14th 06 08:01 AM
convert time imported as text to time format for calculations batfish Excel Worksheet Functions 3 October 27th 05 11:24 PM


All times are GMT +1. The time now is 06:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"