+ Reply to Thread
Results 1 to 4 of 4

Extract current year for Date field and use it in a formula..can't figure out how to do it

  1. #1
    Registered User
    Join Date
    01-21-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    19

    Extract current year for Date field and use it in a formula..can't figure out how to do it


    Hi Everyone,
    This is probably fairly simple to an expert but I for the life of me can't figure out how to do this.
    So I've got a spreadsheet where accounts receivable are listed for each month. (example attached)
    I need to keep a running total of one of the accounts for current year only.
    So it needs to read the year in my date field and keep a running total of the account.
    I know it's a SUMIF function reading the column with the year and summing on the value but I can't figure out how to actually read the year in my date column, extract the year and make a decision based on this year.
    It needs to be dynamic, not hardcoded. And the date needs to be in the format in which I have it, i.e. "January 2019", can't have the year in a separate field=((
    Thanks!!!
    Attached Files Attached Files
    Last edited by MikeSeattle; 07-20-2019 at 11:25 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,891

    Re: Can't for the life of me figure out how to do this...

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-21-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Extract current year for Date field and use it in a formula..can't figure out how to d

    My apologies. Didn't really think about it. I have changed to title to be descriptive. Sorry!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Extract current year for Date field and use it in a formula..can't figure out how to d

    Thank You for changing the title. Try the following:
    1. Paste the following formula into cell F5: =SUMPRODUCT((RIGHT(B$2:B2,4)=RIGHT(B2,4))*(B$4:B4="Account Two")*(C$4:C4))
    2. While cell F5 is still selected press the Ctrl and c keys,
    3. Select cell F11 and press the Ctrl and v keys,
    4. Select cell F18 and press the Ctrl and v keys
    Continue pasting (Ctrl + v) in cells in column F that are adjacent to the "Account Two Total Year to Date:" cells in column E
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. VBA: Show Subtracted Figure In Cell When Cumulative Figure Is Entered
    By hrayani in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-28-2018, 11:29 AM
  2. [SOLVED] Using Linear Regression to predict a future event / performance figure / speed figure
    By Doofus1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-22-2017, 11:51 AM
  3. Replies: 1
    Last Post: 06-22-2017, 02:58 AM
  4. [SOLVED] Can't figure this out for the life of me...Absolute, Relative, Mixed References
    By DallasTigah in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2014, 01:20 AM
  5. Replies: 4
    Last Post: 02-03-2014, 08:05 AM
  6. Sum formula to exclude monthly budget figure when actual figure is entered
    By rocketmail in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2013, 04:22 AM
  7. Calculating monthly sales figure required to make annual turnover figure
    By CatIsoSio Sky in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2010, 04:42 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