If Formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I currently have a formula:

=IF(C26="","",LEN(C26)-LEN(SUBSTITUTE(C26,";",""))+1)

But I need to add another function to it somehow and I'm striking out. I
need to include that if C26="-All Clubs",54. I need to place the number 54
into the formula field if the data in C26 is equal to "-All Clubs" yet still
have it count the ";" for all other data that will be input.

Any suggestions? -- THANKS!
 
=IF(C26="","",IF(C26="-All
Clubs",54,LEN(C26)-LEN(SUBSTITUTE(C26,";",""))+1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
(I received an error on my initial post, which is why there are 2.) Anyway,
I tried your formula and it comes up with 1, not 54.

Any other thoughts?

TIA
 
What do you have in C26?

Biff

Krista said:
(I received an error on my initial post, which is why there are 2.)
Anyway,
I tried your formula and it comes up with 1, not 54.

Any other thoughts?

TIA
 
This field will be populated from an outside source and will contain a series
of names seperated with ";" or "-All Clubs". I need C27 to then count the
number of ";"+1 for the first type of data or 54 for "-All Clubs".

Hope this helps to clarify.
 
That was NG wrap-around, you needed to patch it. Try this version

=IF(C26="","",
IF(C26="-All Clubs",54,
LEN(C26)-LEN(SUBSTITUTE(C26,";",""))+1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Perfect -- THANK YOU sooo much!

--
Krista


Bob Phillips said:
That was NG wrap-around, you needed to patch it. Try this version

=IF(C26="","",
IF(C26="-All Clubs",54,
LEN(C26)-LEN(SUBSTITUTE(C26,";",""))+1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Back
Top