PC Review


Reply
Thread Tools Rate Thread

Date Field Subtraction

 
 
Potsy
Guest
Posts: n/a
 
      28th Mar 2011
Hi

I have problem with Excel (2010) subtracting dates. The date1 is
entered into COLUMN L and a second date entered into COLUMN U when
information sent. The end formula in COLUMN W (below) works fine until
there is no date posted in COLUMN U (i.e. blank) then always sees as -
figure and shows "LATE".

Please help - would like status to show NULL in COLUMN W if nothing in
COLUMN U entered.

Thanks

Potsy

Formula in Column V:

=IF(U334>0,U334-L334,"")

Fomula in Column W:

=IF((V334=0),"ON
TIME",IF((V334<0),"EARLY",IF((V334>0),"LATE",IF((V334="","",""))))
 
Reply With Quote
 
 
 
 
joeu2004
Guest
Posts: n/a
 
      28th Mar 2011
On Mar 28, 6:53*am, Potsy <stu...@batchelor-electrical.co.uk> wrote:
> information sent. The end formula in COLUMN W (below) works
> fine until there is no date posted in COLUMN U (i.e. blank)
> then always sees as - figure and shows "LATE".

[....]
> Formula in Column V:
> =IF(U334>0,U334-L334,"")
>
> Fomula in Column W:
> =IF((V334=0),"ON
> TIME",IF((V334<0),"EARLY",IF((V334>0),"LATE",IF((V334="","",""))))


I don't know what you mean by "as - figure". Perhaps you mean that
V334 results in "-" (zero formatted as Accounting?!).

But W334 is always "LATE" because the comparision text>number is
always TRUE, and you are effectively doing V334>0 before V334="".

The following should fix all potential problems:

V334:
=IF(COUNT(U334,L334),U334-L334,"")

W334:
=IF(V334="","",
IF(V334=0,"ON TIME",IF(V334<0,"EARLY","LATE")))

The COUNT function is true only when there is a date in __both__ U334
and L334.
 
Reply With Quote
 
joeu2004
Guest
Posts: n/a
 
      28th Mar 2011
Errata....

On Mar 28, 11:11*am, joeu2004 <joeu2...@hotmail.com> wrote:
> V334:
> =IF(COUNT(U334,L334),U334-L334,"")


That should be:

=IF(COUNT(U334,L334)=2,U334-L334,"")

 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      28th Mar 2011
Maybe...
=IF(AND(U334>0,L334>0),U334-L334,"NO DATA")
=IF(AND(U334>0,L334>0),IF(V334=0,"ON TIME",IF(V334<0,"EARLY","LATE")),"NO DATA")
--
Jim Cone
Portland, Oregon USA
http://www.contextures.com/excel-sort-addin.html
editorial review of Special Sort excel add-in (30 ways to sort)




"Potsy" <(E-Mail Removed)> wrote in message
news:27e5de6e-d0bc-43f6-903f-(E-Mail Removed)...
> Hi
>
> I have problem with Excel (2010) subtracting dates. The date1 is
> entered into COLUMN L and a second date entered into COLUMN U when
> information sent. The end formula in COLUMN W (below) works fine until
> there is no date posted in COLUMN U (i.e. blank) then always sees as -
> figure and shows "LATE".
>
> Please help - would like status to show NULL in COLUMN W if nothing in
> COLUMN U entered.
>
> Thanks
>
> Potsy
>
> Formula in Column V:
>
> =IF(U334>0,U334-L334,"")
>
> Fomula in Column W:
>
> =IF((V334=0),"ON
> TIME",IF((V334<0),"EARLY",IF((V334>0),"LATE",IF((V334="","",""))))



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date subtraction -How to not show negative when 2nd date not entered Edward Microsoft Excel New Users 1 27th Sep 2007 03:03 PM
RE: Date subtraction -How to not show negative when 2nd date not enter =?Utf-8?B?UHJhbmF2IFZhaWR5YQ==?= Microsoft Excel New Users 0 27th Sep 2007 02:06 PM
Subtraction date to date and answer in Months =?Utf-8?B?d2FoZWVkIFNoYWh6YWQ=?= Microsoft Access Queries 1 14th Jun 2006 09:11 AM
Date Subtraction =?Utf-8?B?Sm9obiBDYWxkZXI=?= Microsoft Excel Discussion 3 10th Nov 2005 02:42 AM
Date Subtraction Rob Microsoft Excel Discussion 1 28th Jul 2003 08:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:18 AM.