# Return value from cell adjacent to formula result

#### timmy180

##### New Member
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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

#### barry houdini

##### MrExcel MVP
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
Thanks alot Barry,

That has worked an absolute treat!

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

Tim

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,167,529
Messages
5,854,281
Members
431,635
Latest member
deekay78

### 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.

### Which adblocker are you using?

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

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