+ Reply to Thread
Results 1 to 6 of 6

Formula Change of month from Dec to Jan

  1. #1
    Registered User
    Join Date
    03-27-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    53

    Formula Change of month from Dec to Jan

    Hi,

    I have a formula that is working fine, but when the month is changed from Dec to jan even though it doesn't have values in Jan, it is pulling a value? Do i need to modify at the DATEVALUE when moving from Dec to Jan?

    =IFERROR((SUMPRODUCT(($A$2:$A$147=$F$4)*($C$2:$C$147="Yes")*(MONTH($D$2:$D$147)=MONTH(DATEVALUE(L1&"1"))))/$T$4),"")

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,615

    Re: Formula Change of month from Dec to Jan

    It shall probably be taken into account in last part of your sumproduct. Unfortunately without sample file it is not that obvious how to achieve this.
    Best Regards,

    Kaper

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,718

    Re: Formula Change of month from Dec to Jan

    It's not clear what you have in those columns, or what is in cell L1. If you are just adding one day to L1 then you don't need MONTH(DATEVALUE(L1&"1")) - you can just do:

    MONTH(L1+1)

    If you want to compare the month and year, then it might be better to do this:

    ...*(TEXT($D$2:$D$147,"mmyy")=TEXT(L1+1,"mmyy"))...

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    03-27-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    53

    Re: Formula Change of month from Dec to Jan

    Participation.xlsx

    Attached is the Sample File.


    Thank you,

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Formula Change of month from Dec to Jan

    Blank cells result in data e.g. 01/01/2001 and you get a count of 2, giving 3% as result.
    Last edited by JohnTopley; 11-05-2015 at 01:53 PM.

  6. #6
    Registered User
    Join Date
    03-27-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    53

    Re: Formula Change of month from Dec to Jan

    Thank you.. resolved my issue.

    Thanks everyone for your help.

+ 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. Replies: 4
    Last Post: 10-10-2014, 01:28 AM
  2. [SOLVED] want to a formula to change these into month/year format.
    By ljdagr8t in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-15-2014, 10:44 AM
  3. Replies: 3
    Last Post: 07-16-2014, 02:53 PM
  4. How to change the month in a formula automatically
    By rakeshgupt8 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-07-2014, 10:21 AM
  5. Need formula based on role change month
    By sekharyadav in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-28-2013, 08:28 AM
  6. Formula to change work schedule from month to month
    By ibtrue in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-29-2010, 04:55 AM
  7. Automatic Month Change Formula
    By calli in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-31-2008, 04:32 PM

Tags for this Thread

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