Lookup Problems

Brabed

Board Regular
Joined
Oct 27, 2005
Messages
54
I have two worksheets. One (Worksheet 1) contains hourly data for the currencies market. The other (Worksheet 2) contains daily data. In column A of both sheets I have a numerical representation of the date. I'm trying to call up the high of the day of yesterday's daily data and compare with the current hourly data of today. I am trying a lookup function that looks like this:

=lookup(A1-1,'Worskheet2!A:A,Worksheet2!D:D)

This should return yesterday's high (Column D) which would be in the same row as yesterday's corresponding date number (A1-1). Now the problem I'm having is that instead of returning the correct value, it always retuns the value of the very last populated cell in column D. What am I doing wrong?

I have used similar LOOKUP formulas with no troubles. Let me know if I am not clear in my question.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Problem solved. It didn't like that the numbers were in descending order, I had to convert to ascending.
 
Upvote 0
Hi,

Looks fine to me assuming it should look like:

=lookup(A1-1,Worksheet2!A:A,Worksheet2!D:D)

Could always try:

=INDEX(Worksheet2!D:D,MATCH(A1-1,Worksheet2!A:A,0))

It wouldn't matter what order your data was in then.

Dom
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,952
Members
448,535
Latest member
alrossman

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