Related:
- Please help. Vlookup thing..not sure
- Transfer data from one excel worksheet to another automatically vlookup - Guide
- Using Vlookup to return insted of 00/01/1900 ✓ - Excel Forum
- Removing "FALSE" from an IF statement with a VLOOKUP ✓ - Excel Forum
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
May 3, 2010 at 01:23 PM
May 3, 2010 at 01:23 PM
Why not just apply filter to see the list ?
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
May 4, 2010 at 09:52 AM
May 4, 2010 at 09:52 AM
Not entirely sure how this search will occur. This should give you a good idea
Sub SearchSchedule() Dim sScheduleSheet As String ' Name of schedule sheet Dim sSearchSheet As String ' Name of search sheet Dim lSchedNameStartRow As Long ' Row where the names on schedule sheet start Dim iDateCol As Integer ' Column where the searched date is located on schedule sheet Dim sSearchString As String ' The date entered on search sheet and is to be searched Dim lScheduleRow As Long ' A row counter for schedule Dim lSearchRow As Long ' A row counter for schedule Dim sScheduleName As String ' the name scheduled Dim sScheduleDate As String 'The value of schedule time sScheduleSheet = "Schedule" ' Name of schedule sheet sSearchSheet = "Sheet1" ' Name of search sheet lSchedNameStartRow = 6 ' Row where the names on schedule sheet start sSearchString = Sheets(sSearchSheet).Range("C2") ' The date entered on search sheet and is to be searched ' Column where the searched date is located on schedule sheet iDateCol = 0 On Error Resume Next iDateCol = Sheets(sScheduleSheet).Cells.Find(sSearchString, Cells(1, 1), SearchOrder:=xlByRows, SearchDirection:=xlNext).Column On Error GoTo 0 ' if the date is found If (iDateCol > 0) Then lScheduleRow = lSchedNameStartRow ' lSearchRow = 2 ' sScheduleName = Sheets(sScheduleSheet).Cells(lScheduleRow, "A") ' loop thru while the there is a non-blank column is encountered Do While (sScheduleData <> "") sScheduleDate = Sheets(sScheduleSheet).Cells(lScheduleRow, iDateCol) If ((sScheduleDate <> "L") And (sScheduleDate <> "WOFF")) Then Sheets(sSearchSheet).Cells(lSearchRow, "A") = sScheduleName lSearchRow = lSearchRow + 1 End If 'increase count by one lScheduleRow = lScheduleRow + 1 sScheduleName = Sheets(sScheduleSheet).Cells(lScheduleRow, "A") Loop Else MsgBox ("Date " & sSearchString & " not found.") Exit Sub End If End Sub
May 4, 2010 at 07:16 AM
May 4, 2010 at 07:51 AM
May 4, 2010 at 08:11 AM
May 4, 2010 at 08:18 AM
Please click the sheet. In sheet 1 in C2 I want the formula or the macro that can give me a list of people present on particular date (when i eneter the date. I hope you understand, thanks alot.
May 4, 2010 at 08:24 AM