Out of a named range that contains dates and blank cells (called date_range) which is 6 columns by a varying number of rows. I'm trying to get a formula that will count how many dates are within January, and another formula for February, March etc.
Out of a named range that contains dates and blank cells (called date_range) which is 6 columns by a varying number of rows. I'm trying to get a formula that will count how many dates are within January, and another formula for February, March etc.
could u please provide a sample workbook
Thanks - Naveed
-----------------------------
If the suggestion helps you, then Click * to Add Reputation
To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
example spreadsheet attached
Hi,
Put proper dates in I2:I13, i.e. the first day of each month then in J2 copied down
=COUNTIFS(date_range,">="&I2,date_range,"<="&EOMONTH(I2,0))
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
if you rearange the data, with a pivot table.
See the attached file.
Notice my main language is not English.
I appreciate it, if you reply on my solution.
If you are satisfied with the solution, please mark the question solved.
You can add reputation by clicking on the star * add reputation.
Hi Smally
try the attached file and confirm
Hi guys, thanks for your help.
Since my data isn't in a normalised format I don't think pivot tables are ideal.
Both suggested formulas work great, and thankfully all dates in the range will always be in the same year. I was trying to use MONTH() in my own formula which is where I was going wrong.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks