Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Aligning login logout times horizontally

Hi Casey,

That's great. A solution, and a learning experience<G.
Maybe you should add a computation of al the times, finish-start aggregated?

Do post back if you get stuck.

Bob

"caseyoconnor10 " wrote in
message ...
Bob,
Excellent...Just Excellent, that is all I can say. I ran with your code
and made a few modifications to completely fix my issue. Here is what I
did. Some employees take multiple breaks so the code needs to look for
more login logout times, therefore I stretched the .Resize to 60 which
expands the number of fields to the right. Then i also forgot the
employees name is also a field that sits to the left of the date field
so I shifted all the code to the right one cell. I was going to use
this code just for single employees, but I again made a different set
of changes and now I am able to fix all employees LoginLogout Times at
once. I want you to know you have really helped me excel in my VBA
knowledge, helped me resolve this current issue, and inspired me to
learn even further in the field of programming. This is the first of
two parts of my problem with login/logout times, however I am going to
try and come up with a solution for the second part on my own.....You
were a huge help...Thank you

Casey

Here is my end result:

Employee 06/01/04 6:49AM 8:20AM 8:35AM 9:45AM
10:30AM 1:41PM 1:59PM 3:16PM
Employee 06/02/04 6:52AM 8:18AM 8:34AM 9:57AM
10:45AM 1:31PM 1:46PM 3:15PM
Employee 06/03/04 6:52AM 8:18AM 8:33AM 10:18AM
Employee 06/04/04 6:49AM 8:19AM 8:35AM 9:45AM
10:31AM 1:32PM 1:47PM 3:15PM


Here is the changes I made below


Dim cLastRow As Long
Dim rng As Range
Dim i As Long

cLastRow = Cells(Rows.Count, "B").End(xlUp).Row
'The next line if set at 4 will make the 1st line of time return
For i = cLastRow To 3 Step -1
If Cells(i, "B").Value = Cells(i - 1, "B").Value Then
'.Offset moves the cell to the right 1 cell
'.Resize allows many cells to be opened at the right
Cells(i, "B").Offset(0, 1).Resize(1, 60).Copy _
Destination:=Cells(i - 1, "B").Offset(0, 5)
If rng Is Nothing Then
Set rng = Cells(i, "B")
Else
Set rng = Union(rng, Cells(i, "B"))
End If
End If
Next i
If Not rng Is Nothing Then
rng.EntireRow.Delete
End If


---
Message posted from http://www.ExcelForum.com/



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
How can i make time schedule sheet for login logout timmings Laxman.bolli Excel Discussion (Misc queries) 2 January 6th 09 05:39 PM
Early Login, Last Logout junoon Excel Worksheet Functions 3 May 9th 07 04:04 PM
aligning sheet tabs vertically, not horizontally Wilma Excel Worksheet Functions 1 March 10th 07 11:15 PM
Login Logout Date Problem ascool_asice Excel Worksheet Functions 2 May 30th 05 12:50 AM
Aligning login logout times horizontally caseyoconnor10 Excel Programming 1 June 17th 04 06:29 PM


All times are GMT +1. The time now is 11:48 PM.

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

About Us

"It's about Microsoft Excel"