VLOOKUP using two different columns

Joeclupis

Board Regular
Joined
Jun 18, 2016
Messages
63
Hello all,

I am trying to set up a worksheet that pulls information from another sheet. On sheet one I have columns starting with a date column (COL A). I am trying to get information from a second column (COL AA) to return to the second worksheet. However, the data in COL AA is not consistent, in that there are only just a few entries throughout the year. I am trying to get the last entry in a calendar year from COL AA.


[TABLE="class: grid, width: 25, align: center"]
<tbody>[TR]
[TD]A[/TD]
[TD]AA[/TD]
[/TR]
[TR]
[TD]1/1/19[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1/31/19[/TD]
[TD]$3.984544[/TD]
[/TR]
[TR]
[TD]2/22/19[/TD]
[TD]$3.04589[/TD]
[/TR]
[TR]
[TD].[/TD]
[TD][/TD]
[/TR]
[TR]
[TD].[/TD]
[TD][/TD]
[/TR]
[TR]
[TD].[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11/28/19[/TD]
[TD]$2.98654[/TD]
[/TR]
[TR]
[TD]12/31/19[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


On the second worksheet the correct answer would be $2.98654. What should the formula look like?

Thank you for your help.

Joseph Carney, C.M.
Airport Operations Specialist
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I was using that as an example. We purchase fuel when our inventory runs low, and this happens at indeterminate intervals. What I am trying to do is to capture the last instance in the year and send that information to another sheet. The last purchase may be as early as October or as late a December. Also, I am not very experienced using a VLOOKUP formula.
 
Upvote 0
oh understood, you want the highest date value with value in column AA. you can use =Maxifs(Column A, Column AA, ">"&0) does that work?
 
Upvote 0
Thank you.

Here is what I have using the correct sheet and column names: =VLOOKUP(MAXIFS('DAILY VALUES'!A:A,'DAILY VALUES'!BI:BI, ">"&0),A:BI,62,0) -- i am getting a #NAME ? error from the formula. The formula is in a cell in a sheet labled YEAR END VALUATION, and the data is in the sheet labeled DAILY VALUES. Did I screw it up somewhere? I will be off duty shortly and will be checking back in tomorrow.
 
Upvote 0
go to formula ribbon, evaluate formula, and check which part is causing the error. the only thing I can think of either the date or price column you have is a text as opposed to a number, so it can't vlookup or find max number.
 
Upvote 0
MAXIFS()

Note: This feature is available on Windows or Mac if you have Office 2019, or if you have an Office 365 subscription. If you are an Office 365 subscriber, make sure you have the latest version of Office.
 
Upvote 0
... i am getting a #NAME ? error from the formula...
Most likely, you just do not have the MAXIFS in your Excel.

Try the following instead:

=LOOKUP(2,1/(YEAR('DAILY VALUES'!A2:A1000)=2019)/('DAILY VALUES'!BI2:BI1000<>""),'DAILY VALUES'!BI2:BI1000)
 
Last edited:
Upvote 0
Crazydragon84 - Thanks for all the help.
Tetra201 - Thank you for the 2nd look. I put in your formula, adjusting for correct ranges and got a #N/A error -- something that I would expect with no data for 2019 yet. I will play with it later today when I get a chance today.

Joeclupis
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top