Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 17
Default dATE cALCULATION

Please help me€¦..

A B C D E F
Name DateON DateOff DateON DateOff Total Dys

The formula below is working fine but if the E is blank some four digit
numbers is showing.
Is there any way to solve this problem.
Actually I am trying to calculate the days worked between the dates in a
particular year. Some people work 12 time a year some 3 times.

=IF(B2="","",C2-B2+E2-D2+€¦€¦€¦€¦€¦..)

Thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 15,768
Default dATE cALCULATION

One way if there aren't too many cells to reference:

=IF(COUNT(B2:C2)=2,C2-B2,0)+IF(COUNT(D2:E2)=2,E2-D2,0)

--
Biff
Microsoft Excel MVP


"Udayan" wrote in message
...
Please help me...

A B C D E F
Name DateON DateOff DateON DateOff Total Dys

The formula below is working fine but if the E is blank some four digit
numbers is showing.
Is there any way to solve this problem.
Actually I am trying to calculate the days worked between the dates in a
particular year. Some people work 12 time a year some 3 times.

=IF(B2="","",C2-B2+E2-D2+.......)

Thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 17
Default dATE cALCULATION

Sir, I tried that but it is not adding each other.

=IF(COUNT(B2:C2)=2,C2-B2,0)
+IF(COUNT(D2:E2)=2,E2-D2,0)
+IF(COUNT(F2:G2)=2,G2-F2,0)
+IF(COUNT(H2:I2)=2,I2-H2,0)
+IF(COUNT(J2:K2)=2,K2-J2,0)
+IF(COUNT(L2:M2)=2,M2-L2,0)
+IF(COUNT(N2:O2)=2,O2-N2,0)
+IF(COUNT(P2:Q2)=2,Q2-P2,0)
+IF(COUNT(R2:S2)=2,S2-R2,0)
+IF(COUNT(T2:U2)=2,U2-T2,0)
+IF(COUNT(V2:W2)=2,W2-V2,0)

as per your guidence this was the formula I applied, is it correct?


"T. Valko" wrote:

One way if there aren't too many cells to reference:

=IF(COUNT(B2:C2)=2,C2-B2,0)+IF(COUNT(D2:E2)=2,E2-D2,0)

--
Biff
Microsoft Excel MVP


"Udayan" wrote in message
...
Please help me...

A B C D E F
Name DateON DateOff DateON DateOff Total Dys

The formula below is working fine but if the E is blank some four digit
numbers is showing.
Is there any way to solve this problem.
Actually I am trying to calculate the days worked between the dates in a
particular year. Some people work 12 time a year some 3 times.

=IF(B2="","",C2-B2+E2-D2+.......)

Thanks in advance




  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 15,768
Default dATE cALCULATION

That'll work. It's syntactically correct and should work but it's kind of
long. This formula will do the same thing:

=SUMPRODUCT(--(MOD(COLUMN(C2:W2),2)=1),--(C2:W2<""),C2:W2-B2:V2)

--
Biff
Microsoft Excel MVP


"Udayan" wrote in message
...
Sir, I tried that but it is not adding each other.

=IF(COUNT(B2:C2)=2,C2-B2,0)
+IF(COUNT(D2:E2)=2,E2-D2,0)
+IF(COUNT(F2:G2)=2,G2-F2,0)
+IF(COUNT(H2:I2)=2,I2-H2,0)
+IF(COUNT(J2:K2)=2,K2-J2,0)
+IF(COUNT(L2:M2)=2,M2-L2,0)
+IF(COUNT(N2:O2)=2,O2-N2,0)
+IF(COUNT(P2:Q2)=2,Q2-P2,0)
+IF(COUNT(R2:S2)=2,S2-R2,0)
+IF(COUNT(T2:U2)=2,U2-T2,0)
+IF(COUNT(V2:W2)=2,W2-V2,0)

as per your guidence this was the formula I applied, is it correct?


"T. Valko" wrote:

One way if there aren't too many cells to reference:

=IF(COUNT(B2:C2)=2,C2-B2,0)+IF(COUNT(D2:E2)=2,E2-D2,0)

--
Biff
Microsoft Excel MVP


"Udayan" wrote in message
...
Please help me...

A B C D E F
Name DateON DateOff DateON DateOff Total Dys

The formula below is working fine but if the E is blank some four digit
numbers is showing.
Is there any way to solve this problem.
Actually I am trying to calculate the days worked between the dates in
a
particular year. Some people work 12 time a year some 3 times.

=IF(B2="","",C2-B2+E2-D2+.......)

Thanks in advance






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
Date Calculation (from entered date / 1yr later in next field) ajaminb Excel Worksheet Functions 6 September 29th 08 02:11 PM
End Date Calculation (adding a start date duration) Silena K-K Excel Discussion (Misc queries) 5 January 25th 08 04:27 PM
Tricky Date calculation: How to calculate a future date [email protected] Excel Discussion (Misc queries) 9 August 11th 06 04:24 AM
Date Calculation Grant Excel Worksheet Functions 4 August 31st 05 08:13 PM
date calculation Juco Excel Worksheet Functions 1 February 12th 05 05:31 PM


All times are GMT +1. The time now is 10:04 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"