Hi,

 

Run the following macro :

 

Sub LoginLogout()

    Dim c As Range

    Range([L3], Cells(Rows.Count, "I").End(xlUp)).ClearContents

    Range([A1], Cells(Rows.Count, 3).End(xlUp)).AdvancedFilter xlFilterCopy,
, [I2:K2], Unique:=True

    Range([L3], Cells(Rows.Count, "I").End(xlUp)).Sort key1:=[I2],
order1:=xlAscending, _

        key2:=[K2], order2:=xlAscending

    Range([I3], Cells(Rows.Count, "I").End(xlUp)).Offset(, 3).FormulaR1C1 =
_

        "=IF(RC[-2]=""Log In"",R[+1]C[-1]-RC[-1],"""")"

    Range([L3], Cells(Rows.Count, "I").End(xlUp)).Subtotal GroupBy:=1,
Function:=xlSum, TotalList:=Array(4), _

        Replace:=True, PageBreaks:=False, SummaryBelowData:=True

    For Each c In Range([I3], Cells(Rows.Count, "I").End(xlUp))

        If Left(c.Value, 5) = "Total" Then

            c.Value = ""

            c.Offset(, 2).Value = "Total Login Hrs"

            c.Offset(, 2).Resize(, 2).NumberFormat = "[h]:mm:ss"

            c.Offset(, 2).Resize(, 2).Font.Bold = True

        End If

    Next c

End Sub

 

Regards.

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de Venkatesan c
Envoyé : vendredi 22 juillet 2011 14:58
À : Google
Objet : Fwd: $$Excel-Macros$$ Login Logout Report Help Required...

 

Hi All,

 

Any update on this...

 

-- 

Best Regards,

Venkat

 

 

---------- Forwarded message ----------
From: Venkatesan c <venkat1....@gmail.com>
Date: Thu, Jul 21, 2011 at 2:36 PM
Subject: Re: $$Excel-Macros$$ Login Logout Report Help Required...
To: Google <excel-macros@googlegroups.com>
Cc: rajanverma1...@gmail.com, lucky60855 <lucky60...@gmail.com>



Hi Rajan&Lucky...

 

You have Calculated based on  First Login & Last Loguot..

 

but I want to get All the Login Logout Calculated..

 

For Example:what i am looking for...

 

 I Have attached...

 

On Thu, Jul 21, 2011 at 1:54 PM, Venkatesan c <venkat1....@gmail.com> wrote:

 

---------- Forwarded message ----------
From: Rajan_Verma <rajanverma1...@gmail.com>
Date: Thu, Jul 21, 2011 at 1:33 PM
Subject: RE: $$Excel-Macros$$ Login Logout Report Help Required...
To: excel-macros@googlegroups.com



See if it help

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Venkatesan c
Sent: Thursday, July 21, 2011 10:35 AM
To: Google
Subject: $$Excel-Macros$$ Login Logout Report Help Required...

 

Dear All,

 

I Have attached data sheet with Login Logout timings..i want how much time
they were in work...Pure Login hrs....

 

have tried one formula...it's working for  first 2 Employess not working for
all...

 

Please suggest any formula or VBA code...


Example:

Data:


User Name

Status

Login & Logout Time


amnp_26990

Log Out

7:15:23 PM


amnp_26990

Log Out

7:15:23 PM


amnp_26990

Log Out

7:15:23 PM


amnp_26990

Log In

10:12:12 AM


amnp_26990

Log In

10:12:12 AM


amnp_26990

Log In

10:12:12 AM


-- 

Required:

 

Total Login Hrs: 


09:33.0

 

Best Regards,

Venkat

 

 

 

 

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel





-- 

Best Regards,

Venkat

 

 

 

 





-- 

Best Regards,

Venkat

 

 

 

 





 

 

 

 

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at  <http://exceldailytip.blogspot.com>
http://exceldailytip.blogspot.com

To post to this group, send email to  <mailto:excel-macros@googlegroups.com>
excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
 <http://www.facebook.com/discussexcel> http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to