# 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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

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

Replies
3
Views
59
Replies
4
Views
241
Replies
5
Views
232
Replies
5
Views
176
Replies
3
Views
218

### Forum statistics

1,126,932
Messages
5,621,676
Members
415,849
Latest member
PhoenixRising2015

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