Lookup first column value, then find last column in matched column return value

paul2342

New Member
Joined
Apr 22, 2020
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
Hi everyone,
I've been digging and diggling online and half the solution, but can't solve the other bit, and help appreciated.

I have this stock sector list like this attached below:

test.jpg


I've managed to drag the formula down of this:

=OFFSET('Sector Long-Short rank'!A5,0,MATCH(MAX('Sector Long-Short rank'!5:5)+1,'Sector Long-Short rank'!A5:'Sector Long-Short rank'!XFD5,1)-2)

(It takes the data from this other sheet here which is this):

thislist.jpg


The problem I've got, is I'm trying to add some sort of lookup so that the values in the first column of the sector name are matched first by finding the matching value in the second sheet, and THEN grabbing the relevant last column value and last but one column value.

I've solved half the formula but can't work out how to match the column A from both sheets and the right row (the problem is you see, column A is sorted in not necessarily the same order and might change, which is the reason for some sort of VLOOKUP or similar which I'm struggling with).

Any help appreciated as my brain is toasted. :D

Paul
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How about
Excel Formula:
=INDEX('Sector Long-Short rank'!$C$5:$Z$100,MATCH($A4,'Sector Long-Short rank'!$A$5:$A$100,0),COUNTA('Sector Long-Short rank'!$C$5:$Z$5)-1)
 
Upvote 0
That's amazing and did the trick perfectly Fluff. Really appreciate you taking the time to reply so fast, thankyou very much. Have a great week :)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Hi Fluff,
I'm not sure if you have time, but I had a quick question. I copied the working sheet to a copy of it, and called the new one with the formula "Top long movers (don't touch)" and the slightly edited the formula to:

=INDEX('Sector history'!$C$4:$Z$100,MATCH($A4,'Sector history'!$A$4:$A$100,0),COUNTA('Sector history'!$C$4:$Z$4)-1)

but for some reason, it returns a value of "0". I've tried to solve it, checking both text lookup are 'text', and also tried the match command on it's own which returns a value of "11", but seem stuck at this last hurdle. I just wondered if there was anything obvious I might have missed?

This is the new 'copy' sheet:

newsheet.jpg



and this is the source one where it's grabbing similar data to the one that was working >>

lookup-sheet.jpg


Any pointers to save my brain from going boom greatly appreciated :)

Best Regards,
Paul
 
Upvote 0
Hi Fluff,
If I CTRL > to the end, it jumps to J14, and then another CTRL > goes to the last excel column of XFD (I'm on a Mac).

Best Regards,
Paul
 
Upvote 0
What does
Excel Formula:
=COUNTA('Sector history'!$C$4:$Z$4)
return?
 
Upvote 0
That should all be ok, what if you change the format of the to Percent?
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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