Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The below code searches for the Value that was selected in Listbox2.
But i have found that there maybe more than 1 value in that column (C) If there is i Always gain the same data. I placed the (<=== HERE) line of code to try to include a 2nd condition to ensure the correct data is selected, but even though there IS a match, i get NO DATA at all. The value in rngFound.Offset(0,15) is Always a date (dd/mm/yyyy) and the value in rngfound is Always Text. Dim rngFound As Range On Error Resume Next Sheets("Data2").Visible = True Sheets("Data2").Unprotect With Worksheets("Data2").Range("C:C") Set rngFound = .Find(What:=ListBox2.Value, After:=.Cells(1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False) If rngFound.Value < "" And ListBox3.Value = rngFound.Offset(0, 15).Value Then <=== HERE .... .... .... end if end with Why does this not find the data with the 2nd condition ? Corey.... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SUMPRODUCT with condition FIND(text) is false | Excel Worksheet Functions | |||
If condition to find Target | Excel Discussion (Misc queries) | |||
How to find first row where condition is true? | Excel Discussion (Misc queries) | |||
?How can I find the maximum column with condition | Excel Discussion (Misc queries) | |||
Find and replace with condition | Excel Discussion (Misc queries) |