+ Reply to Thread
Results 1 to 7 of 7

last value of the month

  1. #1
    Registered User
    Join Date
    01-13-2017
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    2

    last value of the month

    Hello, I'm new to the forum
    I'm trying to figure out how to get the last value of each month from the data below,
    How do I get the result in column D?

    Thanks so much.

    excel.JPG

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: last value of the month

    Please upload an example workbook. Pictures are rarely much use.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: last value of the month

    See my attached sheet...

    It uses the following ARRAY formula to return the value you're looking for:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Remember, ARRAY formulas are applied by pressing CTRL+SHIFT+ENTER, rather than just ENTER.

    You'll notice that the list in column C actually contains dates, not text. They are formatted to show "Jan 2017, Dec 2017...) but they are actually (1/1/2017, 12/1/2016...)

    Hope this helps.

    - Moo
    Attached Files Attached Files

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: last value of the month

    Try this...

    Data Range
    A
    B
    C
    D
    E
    1
    Date
    Value
    ------
    Month
    Value
    2
    1/8/2017
    1.51
    Jan
    1.51
    3
    1/2/2017
    1.4
    Dec
    1.46
    4
    12/19/2016
    Nov
    1.32
    5
    12/12/2016
    1.46
    Oct
    1.48
    6
    12/5/2016
    1.3
    7
    11/28/2016
    8
    11/21/2016
    9
    11/14/2016
    1.32
    10
    11/7/2016
    1.24
    11
    10/31/2016
    12
    10/24/2016
    13
    10/17/2016
    1.48
    14
    10/10/2016
    1.32
    15
    10/3/2016
    1.39


    This array formula** entered in E2 and copied down:

    =INDEX(B$2:B$15,MATCH(MAX(IF(TEXT(A$2:A$15,"mmm")=D2,IF(B$2:B$15<>"",A$2:A$15))),A$2:A$15,0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Last edited by Tony Valko; 01-13-2017 at 01:54 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: last value of the month

    Maybe this
    Enter array formula in D2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ***Array formula
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
    You will know the array is active when you see curly braces { } appear around your formula.
    If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    v A B C D
    1 Date Value Last Value
    2 1/9/2017 1.51 Jan 1.51
    3 1/2/2017 1.4 Dec 1.46
    4 12/19/2016 Nov 1.32
    5 12/12/2016 1.46 Oct 1.48
    6 12/5/2016 1.3
    7 11/28/2016
    8 11/21/2016
    9 11/14/2016 1.32
    10 11/7/2016 1.24
    11 10/31/2016
    12 10/24/2016
    13 10/17/2016 1.48
    14 10/10/2016 1.32
    15 10/3/2016
    Last edited by AlKey; 01-13-2017 at 02:28 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    01-13-2017
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    2

    Re: last value of the month

    Thank you so much to all of you, I don't know much about array, and I hope to learn more!
    Sorry I didn't know how to post a table before, just figured out I needed to "go advanced" for that.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: last value of the month

    You're welcome. We appreciate the feedback!

+ 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. Caclulate month of quarter (1st month - 3rd month)
    By kuraitori in forum Excel General
    Replies: 5
    Last Post: 07-15-2018, 03:53 PM
  2. [SOLVED] Calculation of days per month for dates beginning in one month and ending in another month
    By Fahrettin in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-07-2015, 04:52 PM
  3. [SOLVED] Determine work days in current month or next month based on day of the month
    By sbrnard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2014, 05:14 PM
  4. [SOLVED] Counting & summing formula (until last month,this month,until this month..
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-12-2014, 01:14 PM
  5. find time left in month.days unit between two dates(in YEAR.MONTH.DAY)
    By xcfeng95 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 02-21-2014, 12:55 PM
  6. [SOLVED] Auto instert Month names for This month, Last month and Next month
    By hemal89 in forum Word Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2013, 12:01 PM
  7. Replies: 4
    Last Post: 03-19-2012, 08:58 AM

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