View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
aussiegirlone aussiegirlone is offline
external usenet poster
 
Posts: 94
Default which one to use: Macros / Formula's / Lookup

I have now become a member of thecodecage.com so now I ask where do I put
your suggested code (in what sheet(s)

(links found below)

"Simon Lloyd" wrote:


If further help with it why not join our forums (shown in the link
below) it's completely free, if you do join you will have the
opportunity to add attachmnets to your posts so you can add workbooks to
better illustrate your problems and get help directly with them. Also if
you do join please post in this thread (link found below) so that people
who have been following or helping with this query can continue to do
so. :)
aussiegirlone;328236 Wrote:
I think to understand you slightly! I need to be able to get all the
data in
the site sheets for the total week of each employee. The roster is then
to be
sent to each employee on a weekly basis. The data collected should
accumulate
as the weeks go by without duplications.
Maybe I should send you a copy of two site sheets and two employee
sheets if
that would help


"Simon Lloyd" wrote:


The data in the site sheets for each employee - are you looking to

get
all the data for that employee or just for a certain date or the last
entry?, if you get all the data then the next time you run the coe it
will again collect all the data, the only way to ensure not getting
duplicates is to overwrite all the data in the employee sheet which

may
be counter productive not to mention time and memory consuming!

There are many ways to do it here's just one, change/add the sheet
names in Arr for your site sheets, only run the code when the
activesheet is the employee sheet (and assuming the sheet name is

that
of the employee exactly as it will be found in the site sheets)

Sub Find_employee_data()
Dim Sh As Worksheet
Dim Arr As Variant
Dim MySheet As String
Dim rng As Range, MyCell As Range
Application.ScreenUpdating = False
Arr = Sheets(Array("Sheet1", "Sheet2", "Sheet3"))
MySheet = ActiveSheet.Name
For Each Sh In Arr
Set rng = Sh.Range("A1:A" & Sh.Range("A" & Rows.Count).End(xlUp).Row)
For Each MyCell In rng
If MyCell = MySheet Then
MyCell.EntireRow.Copy Destination:=Sheets(MySheet).Range("A" &
Rows.Count).End(xlUp).Offset(1, 0)
End If
Next MyCell
Next Sh
Application.ScreenUpdating = True
End Sub


aussiegirlone;328132 Wrote:
I'll give you the information that you want, if you tell me what
information
you want.
Can you give me an example of your suggestion please?

"aussiegirlone" wrote:

I have created an Employees Roster have got 15 sheets each Titled

as
a Site
Location. Then I have got another 15 sheets, each with the name

of a
single
employee. What I would like to do is have the employees Roster

Sheets
automatically search all the Site Sheets for the data entered.

Thus,
what
ever is entered into the site sheets it automatically enters the

data
into
the corresponding employee. If this is possible, can anyone help

with
a
formula or macro to do this?
Aussiegirlone

Data entered here
â€*€œ
Sheet Name: ParkPatrols
Name Start Finish Sun Mon Tue Wed Thu Fri Sat
Total Hours
???? 12:00 pm 16:00 pm yes
4

Goes automatically here
â€*€œ
Sheet Name: Employee (1)
???? Lic Number 1234567
Day Date Start Time End Time Site Total Hours



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('http://www.thecodecage.com'

(http://www.thecodecage.com/))

------------------------------------------------------------------------
Simon Lloyd's Profile:

'http://www.thecodecage.com/forumz/member.php?userid=1'
(http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread:

'http://www.thecodecage.com/forumz/showthread.php?t=91647'
(http://www.thecodecage.com/forumz/sh...ad.php?t=91647)




--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=91647