Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find in row
Hello all,
I am having difficulties trying to find the combobox value across Row A then goto the first empty cell in that column. Can't get past the first hurdle. Private Sub ComboBox6_Change() Dim myvalue As String myvalue = ComboBox6.Value Range("A").Select Range("A").Value = Rows("A" & TheRow).find(What:="myvalue", LookAt:=xlWhole) If found = True Then Cell.Select End If End Sub Thanks in advance for any guidance. -- Brian McCaffery |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find in row
On 6 ruj, 10:16, Brian wrote:
Hello all, I am having difficulties trying to find the combobox value across Row A then goto the first empty cell in that column. Can't get past the first hurdle. Private Sub ComboBox6_Change() Dim myvalue As String myvalue = ComboBox6.Value Range("A").Select Range("A").Value = Rows("A" & TheRow).find(What:="myvalue", LookAt:=xlWhole) If found = True Then Cell.Select End If End Sub hello Brian, 1. You must have Do loop or For loop or something wath will be a counter for your "TheRow" variable. 2. If you see a 2. row then you will see the error. You write "Range("A").Select" and my question is: Were is the number of row or variable for the number of row? 3. It is not "LookAt:=xlWhole" it is "LookAt:=xlPart"! Why? Because constant xlWhole look on whole cell, and xlPart look inside of cell and take a look for your word or something else 4. My suggestion is : Dim myvalue As String With Worksheets(1).Range("a1:a36") Set finder = .Find("dobar", Lookat:=xlPart) If Not finder Is Nothing Then firstAddress = finder.Address Do finder.Interior.ColorIndex = 3 Set finder = .FindNext(finder) Loop While Not finder Is Nothing And finder.Address < firstAddress End If End With By ,I.R;) |
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 | |||
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 |