View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Brad Brad is offline
external usenet poster
 
Posts: 57
Default Problem with nesting an OR in a formula

Wendy, solve for a true or false as your first step and "build out" as you
develop your formula; that is, whether the first character for the cell in
question is either an F or a 0, solve that first:

=OR(Left(C10,1)="F",Left(C10,1)=0) ------- this will return a TRUE or a
FALSE

then, build out with the formula by adding your IF in front of the OR...

If(OR(Left(C10,1)="F",Left(C10,1)=0),"AC"&MID(C10, 2,7),"AC"$MID(C10,1,7))

If the "OR" portion of the formula returns a "true," then it will execute
the first bit of code ("AC"&MID(C10,2,7)); if it is false, it will activate
the second piece of code ("AC"$MID(C10,1,7)).

Cheers! Brad



"Wendy" wrote in message
...
Hi

I have a formula which is starting to get beyond my knowledge, I don't
know
where to put the OR!

=IF(LEFT(C10,1)="F","AC"&MID(C10,2,7),"AC"&MID(C10 ,1,7))

My problem is I would like to test if the 1st character is an F or 0 then
drop it, but I still need an 8 digit account number. I can see from the
help it is possible but whereever I put it I just get an error in the
formula

Can anyone help?

Thanks

Wendy