Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula for detecting a certain pattern in a particular row or column?
Hi,
I wonder if there's a formula for detecting a certain pattern in a particular row or column? Any of the cells within the range of "start", and "end" would trigger "do XXX" Presudo code would be: If I can see "X" in range(start, end) Then do XXX Else do OOO End If Thanks, Jacky |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula for detecting a certain pattern in a particular row or col
Dim rStart as Range, rEnd as Range
Set rStart = Range("A1") Set rEnd = rStart.Specialcells(xlLast) If Application.countif(range(rstart, rend),"X") 0 Then XXX Else OOO End If if X is a substring If Application.countif(range(rstart, rend),"*X*") 0 Then Assumes XXX and OOO are the names of macros in the same module -- Regards, Tom Ogilvy " wrote: Hi, I wonder if there's a formula for detecting a certain pattern in a particular row or column? Any of the cells within the range of "start", and "end" would trigger "do XXX" Presudo code would be: If I can see "X" in range(start, end) Then do XXX Else do OOO End If Thanks, Jacky |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula for detecting a certain pattern in a particular row or col
On Feb 8, 12:41 am, Tom Ogilvy
wrote: Dim rStart as Range, rEnd as Range Set rStart = Range("A1") Set rEnd = rStart.Specialcells(xlLast) If Application.countif(range(rstart, rend),"X") 0 Then XXX Else OOO End If Hi Tom, Thanks for the code. I am using Excel 2000, where do I type all these code in? Currently, I am using short codes in the cells like "= +COUNTIF(E18:IV101, "O")" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Subtl column A based on column B. Each time B changes pattern? | Excel Discussion (Misc queries) | |||
Search /Filter vertical Numeric pattern (down single column) | Excel Programming | |||
Search /Filter vertical Numeric pattern (down single column) | Excel Worksheet Functions | |||
Detecting changes in results of formula | Excel Programming | |||
detecting row or column insertion & deletion | Excel Programming |