Related:
- Please help. Vlookup thing..not sure
- Iserror function in excel with vlookup - Guide
- Transfer data from one excel worksheet to another automatically vlookup - Guide
- Copying Excel data from one sheet to another based upon contents of a cell - Excel Forum
- Vlookup if two cells match return value from third - Excel Forum
- How to use vlookup to match data from different sheets - Office Software Forum
2 responses
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
3 May 2010 à 13:23
3 May 2010 à 13:23
Why not just apply filter to see the list ?
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
4 May 2010 à 09:52
4 May 2010 à 09:52
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
4 May 2010 à 07:16
4 May 2010 à 07:51
4 May 2010 à 08:11
4 May 2010 à 08:18
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.
4 May 2010 à 08:24