#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Replace - delete the remainder of the text in the cell after my Find [email protected] Excel Programming 4 August 4th 07 03:39 AM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
find and delete duplicate entries in two columns or find and prin. campare 2 columns of numbers-find unique Excel Programming 1 November 24th 04 04:09 PM
find and delete text, find a 10-digit number and put it in a textbox Paul Excel Programming 3 November 16th 04 04:21 PM


All times are GMT +1. The time now is 03:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"