+ Reply to Thread
Results 1 to 7 of 7

Need one cell to reference just the month from another date-formatted cell

  1. #1
    Registered User
    Join Date
    11-11-2009
    Location
    Washington, DC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Need one cell to reference just the month from another date-formatted cell

    I'm trying to link two different budgets into a third spreadsheet. The final step I'm attempting to accomplish is have an if-and statement reference just the month from a date-formatted cell. One of my departments tracks their budget on a daily basis, i.e. 11/2/2009, 11/3/2009, etc. rather than just 11/2009. I want the if-and statement to return the budget from all days in a given month so i can apply the formula to the whole year, broken down monthly too. I saw a question similar to this one but didn't see any responses so I'm not sure if it can be done. Thanks for the help!
    Last edited by Runnit4; 11-11-2009 at 06:55 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Need one cell to reference just the month from another date-formatted cell

    Hi,
    can you attach a small data sample that illustrates how your workbook is structured? It'll be much easier to suggest a solution. Right now, I'm leaning towards something like SUMPRODUCT or SUMIFS, or an array formula.

    Click "Go Advanced" below and then the paper clip icon to attach a file.

    cheers

  3. #3
    Registered User
    Join Date
    11-11-2009
    Location
    Washington, DC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Need one cell to reference just the month from another date-formatted cell

    Ok, i have the following formulas entered (in two different columns) to distinguish between 'shipping' and 'receiving' (obv data has been changed). But i need it to also read only the month it occurred:

    In H21, =IF(AND(G21="nov",D21="shipping"),F21,"")
    In I21, =IF(AND(G21="nov",D21="receiving"),F21,"")
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-11-2009
    Location
    Washington, DC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Need one cell to reference just the month from another date-formatted cell

    Ok, I'm actually pretty happy i found this, but if anyone reads and is wondering, this is one way of doing what am trying to do...

    =TEXT(MONTH(A19)*29,"mmm") to give me jan, feb, mar...

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Need one cell to reference just the month from another date-formatted cell

    Actually it can be simpler than that....

    =TEXT(A19,"mmm")

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Need one cell to reference just the month from another date-formatted cell

    Hi,

    a pivot table would probably be the best way to sum up the data by month and other criteria, like line of business.

    Based on the data sample you provided you can use a formula like

    =SUMPRODUCT((MONTH(A3:A12=MONTH(H1))*(C3:C12="Shipping")*D3:D12))

    where H1 holds a date, to sum up all shipping amounts for a specific month.

    hth

  7. #7
    Registered User
    Join Date
    11-11-2009
    Location
    Washington, DC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Need one cell to reference just the month from another date-formatted cell

    That's great, that would be the next step I'm trying to accomplish. Both very helpful, thanks guys!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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