Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Connie Martin
 
Posts: n/a
Default Counting problem again!

Hopefully, I can make this simple!

In H9:H400 and J9:J500 I have dates, manually inputted. In K9, I have this
formula: =IF(SUM(H9-J9=0),"-",SUM(H9-J9)), which formula carries down, of
course to K500, calculating the number of days difference between the two
dates. Column K is formatting "Accounting", so when the two manually input
dates are the same and there is no difference in days, then it enters a
simple dash. That all works fine. Now, the question: In I4 I want to put a
formula that counts all the ones that have no difference. I want it to start
with that if there's nothing to put nothing, otherwise count the ones that
have no difference. I tried this:
=IF(COUNT(K8:K500)=0,"",COUNT(K8:K500,"0")) but it doesn't work. I replaced
the "0" with "-", but still it yields nothing. I will have several down the
spreadsheet that will have no difference in dates. I want it to keep a
running total of them. How?
  #2   Report Post  
Connie Martin
 
Posts: n/a
Default

In the formula K8:K500, I meant to type K9:K500, not that it makes any
difference in the worksheet I'm working with, but just for clarification.
Connie


"Connie Martin" wrote:

Hopefully, I can make this simple!

In H9:H400 and J9:J500 I have dates, manually inputted. In K9, I have this
formula: =IF(SUM(H9-J9=0),"-",SUM(H9-J9)), which formula carries down, of
course to K500, calculating the number of days difference between the two
dates. Column K is formatting "Accounting", so when the two manually input
dates are the same and there is no difference in days, then it enters a
simple dash. That all works fine. Now, the question: In I4 I want to put a
formula that counts all the ones that have no difference. I want it to start
with that if there's nothing to put nothing, otherwise count the ones that
have no difference. I tried this:
=IF(COUNT(K8:K500)=0,"",COUNT(K8:K500,"0")) but it doesn't work. I replaced
the "0" with "-", but still it yields nothing. I will have several down the
spreadsheet that will have no difference in dates. I want it to keep a
running total of them. How?

  #3   Report Post  
mzehr
 
Posts: n/a
Default

Hi Connie,
In looking at your formula, it is inserting either a text "-" or a value,
depending on how the formula evaluates. You might consider changing the "-"
to 0, and since your column is formatted as accounting it will show up as "-".
The following formula will count every cell in column K that does not equal 0:
=COUNTIF(K9:K500,"<0")
If you want to count each cell that equals 0 use:
=COUNTIF(K9:K500,"=0") or more simply =COUNTIF(K9:K500,0)
Should you decide to keep the text part of your equation ("-") then use:
=COUNTIF(K9:K500,"-") to count how many cells meet that condition
and to count how many don't use:
=COUNTIF(K9:K500,"<-")
HTH

"Connie Martin" wrote:

Hopefully, I can make this simple!

In H9:H400 and J9:J500 I have dates, manually inputted. In K9, I have this
formula: =IF(SUM(H9-J9=0),"-",SUM(H9-J9)), which formula carries down, of
course to K500, calculating the number of days difference between the two
dates. Column K is formatting "Accounting", so when the two manually input
dates are the same and there is no difference in days, then it enters a
simple dash. That all works fine. Now, the question: In I4 I want to put a
formula that counts all the ones that have no difference. I want it to start
with that if there's nothing to put nothing, otherwise count the ones that
have no difference. I tried this:
=IF(COUNT(K8:K500)=0,"",COUNT(K8:K500,"0")) but it doesn't work. I replaced
the "0" with "-", but still it yields nothing. I will have several down the
spreadsheet that will have no difference in dates. I want it to keep a
running total of them. How?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM
Problem with date base units for x axis Peter Carr Charts and Charting in Excel 1 December 15th 04 09:11 AM
Hyperlink to word document problem JS Links and Linking in Excel 0 December 8th 04 10:54 PM
Paper Tray selection Problem, Michael Hoffmann Excel Discussion (Misc queries) 4 December 3rd 04 09:08 PM
File is locked for Editing by user problem Mirth Excel Discussion (Misc queries) 1 December 3rd 04 04:45 PM


All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"