+ Reply to Thread
Results 1 to 11 of 11

Find the value in a column next to the last date before today

  1. #1
    Registered User
    Join Date
    06-10-2013
    Location
    Aberdeen, UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Find the value in a column next to the last date before today

    I need to pull back a value into a cell telling me what the current license fee is for my project. The license fee varies by year and steps up on the anniversary date. I need to find the value for the current year from the list shown below. I am sure there is a simple way to do it, but haven't been able to hack it from the formulas I have found so far.

    Thanks,

    Mike


    Table.JPG

  2. #2
    Registered User
    Join Date
    06-10-2013
    Location
    Aberdeen, UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Find the value in a column next to the last date before today

    By the way, I realise that in this particular table all the values are the same, but I have mutiple sheets, one per license and for other licenses the fees do change!

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Find the value in a column next to the last date before today

    Perhaps =SUMPRODUCT((YEAR(A1:A10)=YEAR(TODAY()))*B1:B10) where col A contains dates and B the license
    Last edited by Pepe Le Mokko; 03-05-2015 at 08:33 AM.

  4. #4
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Find the value in a column next to the last date before today

    Try this solution

    Capture.PNG

  5. #5
    Registered User
    Join Date
    06-10-2013
    Location
    Aberdeen, UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Find the value in a column next to the last date before today

    Thanks for the advice. See the attached spreadsheet which hopefully illustrates the problem I have more clearly.

    find value related to date.xlsx

  6. #6
    Registered User
    Join Date
    06-10-2013
    Location
    Aberdeen, UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Find the value in a column next to the last date before today

    Sorry JPR, your png isn't displaying for me here.

  7. #7
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Find the value in a column next to the last date before today

    Okay, take a look at the attached
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-10-2013
    Location
    Aberdeen, UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Find the value in a column next to the last date before today

    That's great, thanks. I struggled t get it to work at first, I think that the way I was changing the definition of the arrays was breaking the system, but when I dragged the array area over and re-defined it that way it worked perfectly. Many thanks.

  9. #9
    Registered User
    Join Date
    06-10-2013
    Location
    Aberdeen, UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Find the value in a column next to the last date before today

    I also replaced the definition of a cell with todays date with the term TODAY() and that is working just fine and keeps my worksheet neater! Thanks again JPR

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Find the value in a column next to the last date before today

    I wonder why I take the trouble to answer, my solution is perfectly valid but no one bothers to read it

  11. #11
    Registered User
    Join Date
    06-10-2013
    Location
    Aberdeen, UK
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Find the value in a column next to the last date before today

    I'm sorry Pepe, but I'm afraid your method did not return the correct answer, I think it returned a value which had the same year as TODAY, which means if the license anniversary date is in september I will be showing an incorrect value for the first six months of the year.

    Thankyou for your help though, I am sure that your code may be of help to other people with similar problems.

    Mike

+ 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. [SOLVED] Find today's date in sheet
    By Petros Georgilas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2014, 11:36 AM
  2. Find today's date and then add 1
    By brown3218 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-17-2013, 01:21 AM
  3. Find today's date
    By Lynneth in forum Excel General
    Replies: 1
    Last Post: 01-05-2012, 08:25 AM
  4. Find and copy row containing today's date
    By aabrownell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 04:11 PM
  5. find cell with today's date
    By James D in forum Excel General
    Replies: 2
    Last Post: 01-16-2006, 06:10 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