Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default Help with search code

I need some help in making this line of code search just the left 3
characters of column 'M' starting with cell 2-5000.'T' represents
CbxDept.text and column 'M' holds an alphanumeric number that is automaticlly
created so the first 2 to 3 characters are letters. This line is suppose to
find all the rows that match 'T' and setup to copy all the matching data to
another sheets to use as a report.

Sheets("ProCode").Columns(13).Find(What:=T, After:=Cells(5000, 13),
LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=True).Activate
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Help with search code

maybe this can get you started. post back with more details.

Option Explicit

Sub test()
Dim ws As Worksheet
Dim rngfound As Range
Set ws = Worksheets("ProCode")
With ws.Columns(13)
Set rngfound = .Find(What:="T", after:=Cells(5, 13), LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=True)
End With
MsgBox rngfound.Address
End Sub

--


Gary


"Mekinnik" wrote in message
...
I need some help in making this line of code search just the left 3
characters of column 'M' starting with cell 2-5000.'T' represents
CbxDept.text and column 'M' holds an alphanumeric number that is automaticlly
created so the first 2 to 3 characters are letters. This line is suppose to
find all the rows that match 'T' and setup to copy all the matching data to
another sheets to use as a report.

Sheets("ProCode").Columns(13).Find(What:=T, After:=Cells(5000, 13),
LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=True).Activate



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
Search code? Durzan Excel Programming 6 August 13th 06 01:23 PM
VBA search code Gustavo Strabeli Excel Programming 1 March 13th 06 08:36 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM
Search code Bourbon[_7_] Excel Programming 2 January 10th 04 06:14 PM


All times are GMT +1. The time now is 08:54 PM.

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"