+ Reply to Thread
Results 1 to 5 of 5

How to find last value in a month

  1. #1
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    How to find last value in a month

    Hi,

    Looking for a little help to twitch my formula so I'd get the right value.

    If you can kindly look at the attached, I've been trying to work out the correct formula for sheet Location 1 column AC.

    What I would want it to return is the last value for the month, currently it is adding up all value within my criteria and I couldn't figure out how to relate the date with the most recent value for that certain month.

    Hope someone could help me out.

    Thank you.
    Attached Files Attached Files

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: How to find last value in a month

    In AC6 copied down:

    =LOOKUP(2,1/((DATALIST!$B$4:$B$25<='LOCATION 1'!$AB$4:$AC$4)*(DATALIST!$C$4:$C$25='LOCATION 1'!$B6)),DATALIST!$D$4:$D$25)
    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
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: How to find last value in a month

    Hi Ali,

    Thanks, that was fast. I have a little issue though, I would still need the criteria for the location since I would have different sheets for different locations. I tried to incorporate it in your formula, however it is returning #N/A

    =LOOKUP(2,1/((DATALIST!$B$4:$B$25<='LOCATION 1'!$AB$4:$AC$4)*(DATALIST!$C$4:$C$25='LOCATION 1'!$B6)*(DATALIST!D3:H3='LOCATION 1'!B2:AD2)),DATALIST!$D$4:$H$25)

  4. #4
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: How to find last value in a month

    Hi again,

    I think it would be better to give a visual, so I think here is where the problem arises, I tried to insert Sheet 3 for Location 2, as you'd notice, the formula is not picking up any value for Watermelon though supposed to be it should be 41, I think that is since because the formula is considering that the last date for all Location is 30/06/2019, wherein that actually only applies for Location 1, Location 2's last known data is actually 23/06/2019, hence if should have been returning cell value 41.

    Apologies for the follow up, I am not just quite familiar with the formula you have used. Thanks for your help Ali.
    Attached Files Attached Files

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

    Re: How to find last value in a month

    Try pasting the following into cell AC6 on the Location 2 sheet, then copying down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    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. Find Min-Max for each day of the month
    By tax112 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2016, 04:44 AM
  2. [SOLVED] Find the month between two dates
    By Verbamore in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 07-31-2014, 10:50 PM
  3. [SOLVED] How to find the 'next month' given a starting month as text?
    By thetalldude in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-22-2014, 04:47 AM
  4. 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
  5. Find Month Name
    By Sailaja A in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-13-2014, 02:09 PM
  6. Replies: 10
    Last Post: 01-22-2012, 10:05 AM
  7. How do i find the first value every month
    By pex in forum Excel General
    Replies: 1
    Last Post: 10-06-2005, 02:05 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