Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search code? | Excel Programming | |||
VBA search code | Excel Programming | |||
Excel XP VBA code to search all macro code in Excel module for specific search string criteria | Excel Programming | |||
Excel XP VBA code to search all macro code in Excel module for specific search string criteria | Excel Programming | |||
Search code | Excel Programming |