Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
find
I have the following code:
With rng Set xcell = .find(what:=drwno, LookIn:=xlValues, LookAt:=xlWhole, _ SearchOrder:=xlByColumns) a = xcell.Offset(0, 10).Value xcell.Offset(0, 10).Select If a < linkno Then cnt = 0 Do cnt = cnt + 1 Set xcell = .FindNext(xcell) a = xcell.Offset(0, 10).Value Loop While a < linkno And cnt < drwitemnum + 1 xcell.Select End If End With How do I get the procedure to skip 'find' if there is no 'drwno' in the range? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
find
With rng
Set xcell = .find(what:=drwno, LookIn:=xlValues, LookAt:=xlWhole, _ SearchOrder:=xlByColumns) if xcell is nothing then 'not found, what happens exit sub 'maybe??? else a = xcell.Offset(0, 10).Value .... ranswert wrote: I have the following code: With rng Set xcell = .find(what:=drwno, LookIn:=xlValues, LookAt:=xlWhole, _ SearchOrder:=xlByColumns) a = xcell.Offset(0, 10).Value xcell.Offset(0, 10).Select If a < linkno Then cnt = 0 Do cnt = cnt + 1 Set xcell = .FindNext(xcell) a = xcell.Offset(0, 10).Value Loop While a < linkno And cnt < drwitemnum + 1 xcell.Select End If End With How do I get the procedure to skip 'find' if there is no 'drwno' in the range? Thanks -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
find
Thanks I'll try that
"Dave Peterson" wrote: With rng Set xcell = .find(what:=drwno, LookIn:=xlValues, LookAt:=xlWhole, _ SearchOrder:=xlByColumns) if xcell is nothing then 'not found, what happens exit sub 'maybe??? else a = xcell.Offset(0, 10).Value .... ranswert wrote: I have the following code: With rng Set xcell = .find(what:=drwno, LookIn:=xlValues, LookAt:=xlWhole, _ SearchOrder:=xlByColumns) a = xcell.Offset(0, 10).Value xcell.Offset(0, 10).Select If a < linkno Then cnt = 0 Do cnt = cnt + 1 Set xcell = .FindNext(xcell) a = xcell.Offset(0, 10).Value Loop While a < linkno And cnt < drwitemnum + 1 xcell.Select End If End With How do I get the procedure to skip 'find' if there is no 'drwno' in the range? Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace - delete the remainder of the text in the cell after my Find | Excel Programming | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
find and delete duplicate entries in two columns or find and prin. | Excel Programming | |||
find and delete text, find a 10-digit number and put it in a textbox | Excel Programming | |||
backwards find function to find character in a string of text | Excel Programming |