Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Searching a row ( record )
Dear All,
I have an excel workbook in which more than 25000 rows ( Records ). I want to find an individual row (record) with all column fields. e.g Record Res pipe 4" 50 6 23.7 A particular record contains so many column fields. I have an option through CTRL +F but we can not supply the entire fields. Can i do this by macro. Please assist ? Rgds, Aligahk06 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Searching a row ( record )
I think u can use filters.
On Oct 21, 4:14*pm, Aligahk06 wrote: Dear All, I have an excel workbook in which more than 25000 rows ( Records ). I want to find an individual row (record) with all column fields. e.g Record Res pipe 4" 50 6 23.7 A particular record contains so many column fields. I have an option through CTRL +F but we can not supply the entire fields. Can i do this by macro. Please assist ? Rgds, Aligahk06 * |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Searching a row ( record )
Try out the below macro...You can specify the data to be searched in the
variable varSearch as string columns separated by a pipe symbol. The below macro check for a data in 1 2 3 in ColA ColB and ColC Sub FindRowData() 'Jacob Skaria Dim varFound As Variant, varSearch As Variant Dim strAddress As String, arrSearch As Variant Dim blnMismatch As Boolean, blnFound As Boolean varSearch = "1|2|3" arrSearch = Split(varSearch, "|") ActiveSheet.UsedRange.Font.ColorIndex = 0 With ActiveSheet.Columns(1) Set varFound = .Find(arrSearch(0), _ LookIn:=xlValues, LookAt:=xlWhole) If Not varFound Is Nothing Then strAddress = varFound.Address Do blnMismatch = False For intTemp = 1 To UBound(arrSearch) If CStr(varFound.Offset(, _ intTemp)) < arrSearch(intTemp) Then _ blnMismatch = True: Exit For Next If Not blnMismatch Then Exit Do Set varFound = .FindNext(varFound) Loop While Not varFound Is Nothing And _ varFound.Address < strAddress If Not blnMismatch Then varFound.Resize(, intTemp).Font.ColorIndex = 3 Application.Goto varFound, True blnFound = True End If End If End With If Not blnFound Then MsgBox "Cannot find the data" & _ vbLf & vbLf & varSearch End Sub If this post helps click Yes --------------- Jacob Skaria "Aligahk06" wrote: Dear All, I have an excel workbook in which more than 25000 rows ( Records ). I want to find an individual row (record) with all column fields. e.g Record Res pipe 4" 50 6 23.7 A particular record contains so many column fields. I have an option through CTRL +F but we can not supply the entire fields. Can i do this by macro. Please assist ? Rgds, Aligahk06 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I need to have a record number change for every record | Excel Discussion (Misc queries) | |||
Open new record with selected fields from previous record | Excel Discussion (Misc queries) | |||
Searching specific record using VLOOKUP function. | Excel Worksheet Functions | |||
Searching, matching then searching another list based on the match | Excel Discussion (Misc queries) | |||
Searching for "?" | New Users to Excel |