View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
CINDY CINDY is offline
external usenet poster
 
Posts: 130
Default Subtract 12 hours from date/time

This also worked but you hit the nail on the head with the erroneous data. I
was putting in 2030 instead of 20:30.

Thanks for the alternative formula, I've put it in my notebook for future
knowledge!

Cindy

"Pritesh" wrote:

Hi,

See if it works this way; (I assumed you want to reduce 8 hours from B1).

=IF(B1A1,B1-time(8,0,0),B1)

If still you get error, your data might be errorneous. Then your first step
should be to fix data-error. Please post your feedback or progress.

Regards,
Pritesh

--
Regards,
Pritesh


"Cindy" wrote:

I am trying to subtract 12 hours from a date/time cell if the date in B1 is
greater than A1.

A1 3/3/2010 2030 (formatted: m/d/yyyy hh:mm)
B1 3/4/2010 1030 (formatted: m/d/yyyy hh:mm)

No matter how I format A1, B1 and C1 I still get a #Value error. I am
obviously missing something or leaving something out. Any help is greatly
appreciated.

Cindy