Hi,
I have a problem. I need to count how many values are larger than zero between two given dates in each column. Attached is my sample file. Could this be doable with functions like sumproduct or countif? Thank you!
Hi,
I have a problem. I need to count how many values are larger than zero between two given dates in each column. Attached is my sample file. Could this be doable with functions like sumproduct or countif? Thank you!
Administrative Note:
Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Use I1 for the start date and J1 for the end date, then you can use this formula:
=SUMPRODUCT((C1:G2500>0)*(A1:A2500>=$I$1)*(A1:A2500<$J$1))
Hope this helps.
Pete
Which column are you wanting to look at? Or do you mean ALL columns?
A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
Thanks for replies! I am trying to look at each column individually. So far I have not gotten the formula to work which pete offered.
See attached file, with the original formula in cell I3.
I've also put this formula in I6 (with column letters across row 5):
=SUMPRODUCT((C$1:C$2500>0)*($A$1:$A$2500>=$I$1)*($A$1:$A$2500<$J$1))
and copied it across, to give you the counts for each column.
Hope this helps.
Pete
Yes thank you! I had a typo originally so that was why it did not work.
Glad to help.
If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.
You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).
Pete
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks