T
Todd Huttenstine
Hey guys
The below code looks in the specified range(D1:CA1) and
trys to match the value of combobox1. Currently if it
finds the value, it says it was found, if not it says it
was not found. Instead of this if the value is found I
want it to select the cell in row 2 of the matching column
it found the value in. For instance lets say the value of
the combobox is "dog". The code is then run and it finds
the value "dog" in column H. If this is the case I want
cell H2 to be selected and thats all. If the value dog
was not found in the range, just show my msgbox.
Dim FndRng As Range
Set FndRng = Workbooks("2004 Renewals New.xls").Sheets
("Renewals WOW 2004").Range("D1:CA1").Find(ComboBox1.Value)
If Not FndRng Is Nothing Then
MsgBox ComboBox1.Value & " was found!"
Else
MsgBox ComboBox1.Value & " was not found. Please check
your data and try again."
End If
Thank you.
The below code looks in the specified range(D1:CA1) and
trys to match the value of combobox1. Currently if it
finds the value, it says it was found, if not it says it
was not found. Instead of this if the value is found I
want it to select the cell in row 2 of the matching column
it found the value in. For instance lets say the value of
the combobox is "dog". The code is then run and it finds
the value "dog" in column H. If this is the case I want
cell H2 to be selected and thats all. If the value dog
was not found in the range, just show my msgbox.
Dim FndRng As Range
Set FndRng = Workbooks("2004 Renewals New.xls").Sheets
("Renewals WOW 2004").Range("D1:CA1").Find(ComboBox1.Value)
If Not FndRng Is Nothing Then
MsgBox ComboBox1.Value & " was found!"
Else
MsgBox ComboBox1.Value & " was not found. Please check
your data and try again."
End If
Thank you.