+ Reply to Thread
Results 1 to 5 of 5

Function-Date Problems

  1. #1
    Forum Contributor
    Join Date
    12-04-2003
    Location
    Burrton, Kansas USA
    MS-Off Ver
    2003
    Posts
    162

    Function-Date Problems

    Hi!
    How can I convert a date like this 01/12/06 into one that looks like this Jan-06 so that a sumif or lookup will get all dates that fall in January of 2006. Formatting does not do it because the functions still reads it as 01/12/06.
    Any help or direction would be greatly appreciated!! Thanks!!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Hi, Brian

    Try this....

    For dates in A1:A20 and Amounts in B1:B20

    C1: =SUMPRODUCT((TEXT(A1:A20,"MMM-YY")="Jan-06")*B1:B20)

    That formula returns the sum of the Col_B values where the Col_A date is in the month of January 2006.

    Does that help?

    Regards,
    Ron

  3. #3
    Miguel Zapico
    Guest

    RE: Function-Date Problems

    If you want to check just for the month, this formula will give you always
    the first day of the month for the given date:
    =DATE(YEAR(A1),MONTH(A1),1)
    You can build your lookup table, or sumif conditions, with that date.

    Hope this helps,
    Miguel.

    "Brian Matlack" wrote:

    >
    > Hi!
    > How can I convert a date like this 01/12/06 into one that looks like
    > this Jan-06 so that a sumif or lookup will get all dates that fall in
    > January of 2006. Formatting does not do it because the functions still
    > reads it as 01/12/06.
    > Any help or direction would be greatly appreciated!! Thanks!!
    >
    >
    > --
    > Brian Matlack
    > ------------------------------------------------------------------------
    > Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
    > View this thread: http://www.excelforum.com/showthread...hreadid=543470
    >
    >


  4. #4
    Forum Contributor
    Join Date
    12-04-2003
    Location
    Burrton, Kansas USA
    MS-Off Ver
    2003
    Posts
    162
    Thanks Miquel! Works Great!

  5. #5
    Forum Contributor
    Join Date
    12-04-2003
    Location
    Burrton, Kansas USA
    MS-Off Ver
    2003
    Posts
    162
    Quote Originally Posted by Ron Coderre
    Hi, Brian

    Try this....

    For dates in A1:A20 and Amounts in B1:B20

    C1: =SUMPRODUCT((TEXT(A1:A20,"MMM-YY")="Jan-06")*B1:B20)

    That formula returns the sum of the Col_B values where the Col_A date is in the month of January 2006.

    Does that help?

    Regards,
    Ron
    Thanks Ron! This will help in another area of my spreadsheet as well!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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