Hi all, I have some data & want to count the individual number of days for each month.
Example attached..
Hi all, I have some data & want to count the individual number of days for each month.
Example attached..
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.
try this. hth
Thanks for the reply, not sure how it relates to my problem..
MQ
oh sorry. i looked at it too quick & misunderstood what you were solving for...
so you want to know how many Apr 1st's appear in this list (for example) right? or did you want how many days per each month appear in the list? either way, try this.
tmp.solved.xlsx
Neither of those. The answer for April is 22 because of the 30 days in April 22 of them appear in my data.
pickslides, I believe you are asking how many unique dates are listed for each month.
Your data has some problems. All of your dates for April (except April 3 and 4) are text, not dates, making this process extremely difficult to resolve. I think you may have some localization issue where Excel doesn't recognize 14/4/2014 in Aussie format as a valid date, and so it is interpreted as text. Or you may have actually entered them as text to start with. I'm not sure.
Also, whenever dealing with dates, it is always better to use actual dates. In C7:C10, you have typed in month names as text. If you want to count dates for each month, it is going to be better for these to be dates so you can test the dates in your list against these dates. For example, use 1/4/2014 for April (assuming Aussie date format), then use formatting to display "April".
Once you have your data corrected I can look at how to do the counts. It is going to require an array formula.
Once you have the dates corrected as per 6StringJazzer's post above, and changed the months in column c to dates as well (formatted to Mmm to retain same look) the following will work as an array formula (Ctrl+Shift+Enter).
Formula:Please Login or Register to view this content.
Last edited by gak67; 05-07-2014 at 10:14 PM.
But if it is just weekend days that are not included in your data a simpler formula would beFormula:Please Login or Register to view this content.
Please see attached file with date converting formula and unique dates calculations.
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
@6StringJazzer, thanks for explaining the inconsistent raw date inputs - i noticed it too but hoped if OP saw that the month in text format or the pivot was not counting them as USA date formats dates as expected, he could elaborate/make changes needed to fix the formulas i provided (fyi - in fairness I added the 1st col with month as text MMM, to facilitate the countifs per each month)
You are so right about DATES they are TRICKY TRICKY little DEVILS in the programming world, no matter what code language you are writing them in! it was an eye-opener to me as i discovered how complicated they can be when i was first learning .NET programming in VB and JS. Excel is certainly no exception - maybe even more complicated in some ways.
Thank you for the feedback!
Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks