Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim d as range
For n = 1 To i With Range("B4:b369") Set d = .Find(What:=dato(n), _ Lookin:=xlValues, Lookat:=xlPart, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not d Is Nothing Then rad = d.Row End If End With Next Try doing the search manually and see if it is found. If you are looking for a date, Find sometimes has a hard time with dates. Adjust the arguments above to Find to match where and how find should look for the value. Searching a single row would be no different. -- Regards, Tom Ogilvy "Jon B" wrote in message ... I am a newbie and need some help. I am trying to find the row and thats match the value in Dato(n), but the code below does not work. It cannot find the value that it is looking for. What can I have done wrong here. My main purpose is really to find the row that match, but in addition I would do the same for columns (With different values), so that I get the row and column that match to criteria I have, so I will get the intersection between the two. Maybe it is an easier way to find this. For n = 1 To i With Range("B4:b369") Set d = .Find(dato(n)) If Not d Is Nothing Then rad = d.Row End If End With Next I have "dimmed" d as Variant, and I know that this is not correct, what kind of declaration should the d have. Regards, Jon |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
FInd common data in one column then add number in adjacent column | Excel Worksheet Functions | |||
find last row value in column when using MATCH to find column | Excel Worksheet Functions | |||
Find something in column a then find if column B matches criteria | Excel Discussion (Misc queries) | |||
Find max value in one column and return the value of corrosponding cell in different column | Excel Worksheet Functions | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions |