+ Reply to Thread
Results 1 to 4 of 4

Count of months against current month

  1. #1
    Registered User
    Join Date
    10-01-2015
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    2

    Count of months against current month

    Hi there -

    I'm trying to work out a formula that will check the current month (from today's date) and see whether there are any occurrences of that in other sheets, in a range.

    I've uploaded an example of the data I'm working with. In sheets A,B,C & D will be a list of dates and on the Check sheet I want to have a list of the sheets and a count of how many rows have the same month / year combination. I think it will be something like =COUNTIF(A!G2:G8,IF((MONTH(B2)+YEAR(B2))=(MONTH(A!G2)+YEAR(A!G2)),"Yes","No")) but I know the end of it is wrong.

    This workbook will be opened at the beginning of each month and someone will check from the Check sheet whether they need to do something this month.

    Example.xlsx

    Thanks in advance!

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Count of months against current month

    Hi,

    Welcome to the Forum.

    Try the following formula in B5:
    =COUNTIFS(A!G:G,">"&EOMONTH($B$1,-1),A!G:G,"<="&EOMONTH($B$1,0))

    In B6:
    =COUNTIFS(B!G:G,">"&EOMONTH($B$1,-1),B!G:G,"<="&EOMONTH($B$1,0))

    B7:
    =COUNTIFS('C'!D:D,">"&EOMONTH($B$1,-1),'C'!D:D,"<="&EOMONTH($B$1,0))

    B8:
    =COUNTIFS(D!D:D,">"&EOMONTH($B$1,-1),D!D:D,"<="&EOMONTH($B$1,0))

    See the attached file.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-01-2015
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    2

    Re: Count of months against current month

    Perfect! Thank you very much.

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Count of months against current month

    You are welcome

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

    Also, 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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA Insert Current Month, Year and subsequent months/year for 15 months
    By MichiganWilliams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2014, 03:49 PM
  2. Index Match based on months away from current month
    By lpuerta75 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-15-2014, 04:24 PM
  3. Replies: 5
    Last Post: 04-09-2014, 08:13 AM
  4. Macro using vlookups comparing 2 months paysheet(previous month and current month)
    By srinivasan1965 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-07-2012, 03:45 AM
  5. Chart the last 3 Months including the current month
    By ioncila in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2012, 01:22 PM
  6. Replies: 6
    Last Post: 08-30-2011, 08:47 AM
  7. VB - Writes current month and previous months in cells
    By adgjqetuo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2009, 06:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1