Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom Ogilvy wrote:
Sub proba2() If InStr(1, Range("A1").Value, Range("B1").Value, vbTextCompare) 0 Then ActiveCell.Offset(10, 0).Activate End If End Sub You were testing the string literals/constants A1 and B1, not what was in the Cells A1 and B1. I wanted to change the "D" range but it doesn't work in the below example. Is there another way to do it ? Sub Comparison() Dim Rng As Integer Dim i As Integer Rng = Selection.Rows.Count For i = 2 To Rng If InStr(1, Range("C2").Value, Range("D(i)").Value, vbTextCompare) 0 Then ActiveCell.Offset(10, 0).Activate End If Next i End Sub -- Tomek |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Find" a wildcard as a place marker and "replace" with original va | Excel Discussion (Misc queries) | |||
How do I replace decimals starting with "." to "0." in excel? | Excel Discussion (Misc queries) | |||
Converting "uppercase" string data to "lower case" in CSV file | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Replace dialog should put focus on "Find What" not "Replace With" | Excel Discussion (Misc queries) |