Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2005

Tip: Looking for answers? Try searching our database.

linking data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kevhatch - 20 Dec 2005 10:12 GMT
Hi,
I have a worksheet that I enter details of worksheets handed in by employees
i.e. in col1 name, in col2 date and in col3 if worksheets not handed in I
enter L,H or S (Late,Holiday or Sick).

What I am after is to list the names of employees on a new sheet if they
have L,H or S against their name and also to show against their name the
reason (Late,Holiday or Sick rather than L,H or S).
Hope this makes sense.
Thx in advance
Kev
Bill Ridgeway - 20 Dec 2005 11:01 GMT
Have you looked at the possibility of using a pivot table?  In essence this
gathers required information into a table.  Have a look at <Data><Pivot
table and pivot chart report ...>

Basically you drag the headings into the relative parts of the report.
However, in practice you may need to have a few goes before getting it just
right.

Regards.

Bill Ridgeway
Computer Solutions

> Hi,
> I have a worksheet that I enter details of worksheets handed in by
[quoted text clipped - 8 lines]
> Thx in advance
> Kev
Norman Jones - 20 Dec 2005 11:29 GMT
Hi Kev,

You could use the Advanced Filter feature to extract the Late, Holiday and
Sick data to another sheet.

If you are not familiar with the Advanced Filter, see Debra Dalgleish's
tutorial at:
       http://www.contextures.com/xladvfilter01.html

If you wish to automate this, you could turn on the macro recorder while you
perform the steps manually. This will provide you with base code which can
be edited for deneral application. If you experience any problems with such
editing, post back with specifics.

If, alternatively, you wish the record to be maintained dynamically, try:

'=============>>
Private Sub Worksheet_Change(ByVal Target As Range)

Dim destSH As Worksheet
Dim destCell As Range
Dim arr As Variant

If Target.Count > 1 Then Exit Sub

Set destSH = ThisWorkbook.Sheets("Record")  '<<==== CHANGE
Set destCell = destSH.Cells(Rows.Count, "A").End(xlUp)(2)

arr = Array("L", "H", "S")

If Not Intersect(Target, Columns(3)) Is Nothing Then
   With Target
   If Not IsError(Application.Match(UCase(.Value), arr, 0)) Then
       .Offset(0, -2).Resize(1, 3).Copy Destination:=destCell
   End If
   End With
End If

End Sub
'<<=============

This is worksheet event code and should be pasted into the worksheets's code
module (not a standard module and not the workbook's ThisWorkbook module):

Right-click the worksheet's tab
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.

If you are not familiar with macros, you may wish to visit David McRitchie's
'Getting Started With Macros And User Defined Functions' at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

---
Regards,
Norman

> Hi,
> I have a worksheet that I enter details of worksheets handed in by
[quoted text clipped - 8 lines]
> Thx in advance
> Kev
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.