Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search for Change in a column.
If there a low impact way of searching a colomn for a change.
i.e. Column 5 has 204 rows of "Text1", then 318 rows of "Text3" then 128 rows of "Text2", then 356 rows of "Text3", etc. At run time, I "know" column 5 and how many total rows I have, but I don't know the actual values I may find or how many of each I'll have. Fuctionally, I would like something similar to: Set rngSearchRange = Range(Cells(1,5),Cells(lngLastRow, 5) strSearchText = rngSearchRange.Cells(1).Value Set rngHitCell = rngSearchRange .Find(What:= ^strSearchText) 'First cell that doesn't match While Not rngHitCell is Nothing <Do processing on Section upto HitCell Set rngSearchRange = Range(rngHitCell,Cells(lngLastRow,5) strSearchText = rngHitCell.Value Set rngHitCell = rngSearchRange .Find(What:= ^strSearchText) Wend Right now, the fastest way seems to be read the column into a variant to move it into memory, iterate through the array, and process worksheet based on index values in the variant. This question is not a matter of finding a way to do what I want, it's about finding a better way. TIA, Bob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search for a column based on the column header and then past data from it to another column in another workbook | Excel Programming | |||
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look | Excel Programming | |||
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look | Excel Discussion (Misc queries) | |||
Loop through column headers to search from column name and get cell range | Excel Programming | |||
URGENT -- search in string for a value in another column, if found, return value from next column | Excel Programming |