Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching
Hi,
I am very confused why this code doesn't work. In the watch window the text value is the same as the line1.offset value but the if statements is never excuted. For Each line1 In Category.Cells If (line1.Offset(0, 1).Value = text) Then TotalExist = True Exit For End If Next line1 Thank you in advance, LC |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching
LC
Unless text is a variable name If (line1.Offset(0, 1).Value = "text") Then should work. HTH Henry "LC" wrote in message ... Hi, I am very confused why this code doesn't work. In the watch window the text value is the same as the line1.offset value but the if statements is never excuted. For Each line1 In Category.Cells If (line1.Offset(0, 1).Value = text) Then TotalExist = True Exit For End If Next line1 Thank you in advance, LC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Searching for... | Excel Discussion (Misc queries) | |||
Searching for #N/A | Excel Worksheet Functions | |||
Searching, matching then searching another list based on the match | Excel Discussion (Misc queries) | |||
searching for tab | Excel Discussion (Misc queries) | |||
Searching the first name only | Excel Discussion (Misc queries) |