Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to have a record number change for every record Puget Sound Courier Service Excel Discussion (Misc queries) 1 July 12th 09 03:32 PM
Open new record with selected fields from previous record Design by Sue Excel Discussion (Misc queries) 1 June 12th 09 02:24 PM
Searching specific record using VLOOKUP function. dev Excel Worksheet Functions 12 July 4th 08 11:51 PM
Searching, matching then searching another list based on the match A.S. Excel Discussion (Misc queries) 1 December 13th 06 05:08 AM
Searching for "?" Bill Ridgeway New Users to Excel 3 August 3rd 05 10:35 AM


All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"