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
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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
 

timmy180

New Member
Joined
Apr 7, 2009
Messages
6
Thanks alot Barry,

That has worked an absolute treat!

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

Tim
 

Watch MrExcel Video

Forum statistics

Threads
1,128,086
Messages
5,628,591
Members
416,326
Latest member
NinaChristal

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
Top