Formula returnsas "1" even with nothing to solve for?

J

joromajr

-- Question--

I used the count function to determine the number of time check dates go
beyond term limit. I have not even encoded check dates already cell returns
"1"?

"=COUNT(P2-H2>J2)+(S2-H2>J2)+(V2-H2>J2)+(Y2-H2>J2)+(AB2-H2>J2)+
(AE2-H2>J2)+(AH2-H2>J2)+(AK2-H2>J2)+(AN2-H2>J2)+(AQ2-H2>J2)+
(AT2-H2>J2)+(AW2-H2>J2)+(AZ2-H2>J2)+(BC2-H2>J2)+(BF2-H2>J2)+
(BI2-H2>J2)+(BL2-H2>J2)+(BO2-H2>J2)+(BR2-H2>J2)+(BU2-H2>J2)+
(BX2-H2>J2)+(CA2-H2>J2)+(CD2-H2>65)+(CG2-H2>J2)"

Where:
H2 is invoice date
J2 is term limit
joromajr
 
D

Dave Peterson

Did you miss a couple of ()'s when you typed this post?

I guessing your formula looks more like:

=COUNT((P2-H2>J2)+(S2-H2>J2)+(V2-H2>J2)+(Y2-H2>J2)+(AB2-H2>J2)+
(AE2-H2>J2)+(AH2-H2>J2)+(AK2-H2>J2)+(AN2-H2>J2)+(AQ2-H2>J2)+
(AT2-H2>J2)+(AW2-H2>J2)+(AZ2-H2>J2)+(BC2-H2>J2)+(BF2-H2>J2)+
(BI2-H2>J2)+(BL2-H2>J2)+(BO2-H2>J2)+(BR2-H2>J2)+(BU2-H2>J2)+
(BX2-H2>J2)+(CA2-H2>J2)+(CD2-H2>65)+(CG2-H2>J2))

All those expressions are returning numbers--but you're adding them into a
single number.

=count(1+0+1+0+1+1+1)
returns 1.

I'm guessing that you don't want the equivalent of:
=count(1,0,1,0,1,1,1)
since it would count the 0's as well as the 1's.

I think you'll want to drop the =count() function and just add those numbers
that evaluate to true/false (1's/0's).

(P2-H2>J2)+(S2-H2>J2)+(V2-H2>J2)+(Y2-H2>J2)+(AB2-H2>J2)+
(AE2-H2>J2)+(AH2-H2>J2)+(AK2-H2>J2)+(AN2-H2>J2)+(AQ2-H2>J2)+
(AT2-H2>J2)+(AW2-H2>J2)+(AZ2-H2>J2)+(BC2-H2>J2)+(BF2-H2>J2)+
(BI2-H2>J2)+(BL2-H2>J2)+(BO2-H2>J2)+(BR2-H2>J2)+(BU2-H2>J2)+
(BX2-H2>J2)+(CA2-H2>J2)+(CD2-H2>65)+(CG2-H2>J2)

ps. Why is this in your formula:

+(CD2-H2>65)+

It looks out of place.
 
J

joromajr

-- follow up--

Thanks for the quick reply. I did as you said but still the "1" appears and
yes CD2 is part of the solution.

Have other suggestions, coz I really need them.
joromajr
 
D

Dave Peterson

Maybe each of those addends should be more like:

((p2-h2)>j2)

Was 65 part of the solution?
 
R

Rick Rothstein \(MVP - VB\)

Exactly what did you do? If you used this...

=(P2-H2>J2)+(S2-H2>J2)+(V2-H2>J2)+(Y2-H2>J2)+(AB2-H2>J2)+(AE2-H2>J2)+(AH2-H2>J2)+(AK2-H2>J2)+(AN2-H2>J2)+(AQ2-H2>J2)+(AT2-H2>J2)+(AW2-H2>J2)+(AZ2-H2>J2)+(BC2-H2>J2)+(BF2-H2>J2)+(BI2-H2>J2)+(BL2-H2>J2)+(BO2-H2>J2)+(BR2-H2>J2)+(BU2-H2>J2)+(BX2-H2>J2)+(CA2-H2>J2)+(CD2-H2>J2)+(CG2-H2>J2)

as Dave suggested, it works fine (note I changed the next-to-last logical
expression to use J2 rather than 65 as it seemed highly unlikely that, given
the structure of the formula, that one element should be different in that
way.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top