Return value from cell adjacent to formula result

timmy180

New Member
Joined
Apr 7, 2009
Messages
6
Hi,

I'm completely baffled on this one! Any help v.much appreciated!

I'll give you a simplified example of what i would like to do, then an actual example.


I think vlookup is unsuitable as the table will not be sorted in ascending order.



In basic terms I have the following formula =large(D1:D10,1) to return the largest number in the range D1:D10.

What I would like to do is return the corresponding value in row A. So if for example D4 had the largest value, my formula would return the value in A4.



Thats the simple version, however in my workbook I am actually using the following formula to find the largest value based on two critera in other columns;

=LARGE(IF(All_Courses_Stats!$J$6:$J$905="NO",IF(All_Courses_Stats!$C$6:$C$905="Creative Industries",All_Courses_Stats!$AJ$6:$AJ$905,0),0),1)

i.e. column J must = "NO" and column C Must equal "Creative Industries"

I would rather keep it formula orientated for this one - however any VBA suggestions are great also.

Many Thanks for any suggestions!!

Tim
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hello Tim, welcome to MrExcel

You can do that but it's a little complex. I'm not sure of the column from which you want to return a value, I assume it's column B but you can change that easily, it's the first range in the formula.....

=INDEX(All_Courses_Stats!$B$6:$B$905,MATCH(LARGE(IF(All_Courses_Stats!$J$6:$J$905="NO",IF(All_Courses_Stats!$C$6:$C$905="Creative Industries",All_Courses_Stats!$AJ$6:$AJ$905)),1),IF(All_Courses_Stats!$J$6:$J$905="NO",IF(All_Courses_Stats!$C$6:$C$905="Creative Industries",All_Courses_Stats!$AJ$6:$AJ$905)),0))

confirmed with CTRL+SHIFT+ENTER so that curly braces like { and } appear around the formula in the formula bar
 
Upvote 0
Thanks alot Barry,

That has worked an absolute treat!

You've saved me a really big headache and lots of messing around there!

Tim
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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