Link to home
Start Free TrialLog in
Avatar of Seamus2626
Seamus2626Flag for Ireland

asked on

IF ignoring special characters

=IF(LEFT(B2,5)="Slide","",IF(AND(ISNUMBER(B2),B2>0),"",IF(B2="a name","","Action")))

                                                                         
Hi, if B2 contains character  -------

i would like to ignore, leave blank, i would implicity state this but the amount of dashes varies e.g

-------
-----------------

and on some lines are stacked on tope of each other

Thanks
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

=IF(or(LEFT(B2,5)="Slide",LEFT(B2,5)="-----"),"",IF(AND(ISNUMBER(B2),B2>0),"",IF(B2="a name","","Action")))
Avatar of Seamus2626

ASKER

Hi ssaqibh,

that did not ignore

===================

thanks
Perhaps try

=IF(OR(LEFT(B2,5)="Slide",COUNTIF(B2,"*--*")),"",IF(AND(ISNUMBER(B2),B2>0),"",IF(B2="a name","","Action")))

regards, barry
replace the ----- with =====
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Barry, your formula dramatically increased what i was expecting back. ssaqibh bought back what i was expecting

many thanks