Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

#### Post your problem and you’ll get Expert help in seconds.

Your message must be at least 40 characters
Our professional Expert are available now. Your privacy is guaranteed.

# Get last entry by month and year

We can use the LOOKUP function and the TEXT function to get the last entry by Month and Year in a data. The steps below will walk through the process.

Figure 1: How to Get Last entry by Month and Year

## General Formula

`=LOOKUP(2,1/(TEXT(dates,"mmyy")=TEXT(A1,"mmyy")),values)`

## Formula

`=LOOKUP(2,1/(TEXT(\$B\$4:\$B\$11,"mmyy")=TEXT(E6,"mmyy")),\$C\$4:\$C\$11)`

## Setting up the Data

• We will set up data by inputting our Dates (month and year) in Column B and Sales in Column C
• Our result will be returned in Column F by the formula. We intend to know the last SALE VALUE that was added to the table for each month

Figure 2: Setting up the Data

Note- We have formatted the dates by doing the following. First, we will type the dates in this format into COLUMN B: 1/1/2019. We will highlight the dates from Cell B4 to Cell B11. We will right-click and click on format cells.

Figure 3: Formatting the Dates

• We will click on Custom and select mmm-yy. We will press OK
• We will do the same thing for the LOOKUP dates. However, we will simply type the month and year instead. For instance, Jan 2019

## Get Last entry by Month and Year

• We will click on Cell F6
• We will insert the formula below into the cell
`=LOOKUP(2,1/(TEXT(\$B\$4:\$B\$11,"mmyy")=TEXT(E6,"mmyy")),\$C\$4:\$C\$11)`
• We will press the enter key

Figure 4: Last entry for January 2019

• We will click on Cell F6 again
• We will double click on the fill handle tool which is the small plus sign you see at the bottom right of Cell F6. Select and drag down to copy the formula to other cells.

Figure 5: Last entries for January, February, and March 2019

We can confirm our result by looking at the exact dates in figure 2.

## Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

### Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Solution examples
I need to create a formula that fills finds the Sheet (col A) and then the Component (col B) and then adds the value I put in Col H into a cell in the corresponding cell of column of the found sheet.
Solved by Z. S. in 60 mins
need help how to add a percentage to a column and subtract
Solved by B. U. in 43 mins
I need a formula that has these 2 rules. If letter was rec'd between 1st and 15th = 1st of the month following letter rec'd date. If letter was rec'd between 16thst and end of the month= 1st of the 2nd month following letter rec'd date.
Solved by V. F. in 20 mins
I have an excel spreadsheet with two worksheets. And the following formula is not pulling the data. =VLOOKUP(\$A\$2:\$A\$566,'Module Type Info'!\$A\$2:\$D\$97,4,FALSE) In sheet 1, I am using all data in column 1 for the lookup In sheet 2, I have selected the first 4 columns of data for array I want to pull data from sheet 2, column 4 into sheet 1 Both tabs are sorted alphabetically. Confirmed that the value in column 4 of sheet 2 is a TEXT field. Why is this not pulling the info from sheet 2 into sheet 1
Solved by F. L. in 39 mins
I'm trying to figure out how to have a value found in column c placed into column d if the value in column a equals that found in column b. Does that make sense?
Solved by I. H. in 40 mins