Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
comlex Find statement
Is it possible to write a single Find statement in code that will search for
a first string in say Range("A2") and if true look for another string in Range("B2"). |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
comlex Find statement
Use LEFT,MID,RIGHT functions
A2 = apple B2 = boy =IF(LEFT(A2,1)="a",LEFT(B2,1),"") -- If this post helps click Yes --------------- Jacob Skaria "Farooq Sheri" wrote: Is it possible to write a single Find statement in code that will search for a first string in say Range("A2") and if true look for another string in Range("B2"). |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
comlex Find statement
Why do you think it is important for it to be a single statement? Aside from
that, it would have been nice if you gave some examples so we would know if you are trying to find whole or partial matches. With that said, I don't think you need to use the Find function at all. If you are looking for whole matches, then just test the cells content directly... If Range("A2").Value = "Text1" And Range("B2").Value = "Text2" Then If, on the other hand, you are looking for partial matches, then use the InStr function... If InStr(Range("A2").Value, "Text1") 0 And _ InStr(Range("B2").Value, "Text2") 0 Then -- Rick (MVP - Excel) "Farooq Sheri" wrote in message ... Is it possible to write a single Find statement in code that will search for a first string in say Range("A2") and if true look for another string in Range("B2"). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible to find which sql statement is running? | Charts and Charting in Excel | |||
If statement to find NA() | Excel Worksheet Functions | |||
If statement to find NA() | Excel Worksheet Functions | |||
Copying text value based on long (comlex) calculation | Excel Discussion (Misc queries) | |||
Copying text value based on long (comlex) calculation | Excel Discussion (Misc queries) |