Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help With Find
I'm trying to find a row based on two criteria the first is a text box in a form called txton the value of which is held on column A. the second criteria is in the same row it finds an empty cell in column F. using the code below finds the first criteria no problem. does anyone have any idea how too expand this code to find the second criteria. Thanks in advance Dim FindString As String Dim rng As Range FindString = UserForm1.txtON.Value If Trim(FindString) < "" Then With Sheets("Re - Rostered Restdays").Range("A:A") Set rng = .Find(What:=FindString, _ After:=.Cells(.Cells.Count), _ LookIn:=xlValues, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then Application.Goto rng, True Else MsgBox "Nothing found" End If End With End If -- paul_gu ------------------------------------------------------------------------ paul_gu's Profile: http://www.excelforum.com/member.php...o&userid=33007 View this thread: http://www.excelforum.com/showthread...hreadid=530570 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Despite data existing in Excel 2002 spreadsheet Find doesn't find | Excel Discussion (Misc queries) | |||
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 |