Need Help With Formula

it's an excel world

Board Regular
Joined
Sep 17, 2008
Messages
126
Hello all,

I need a formula that will accomplish the following...

I want to look in cell AQ2 and if it is not blank, I need to look at the values in cells A4 & AN4. Then look down both columns A & AN until I locate the last row in which the values in columns A & AN mirror those of cells A4 & AN4, and return the value in column D of that particular row.

I hope this information is sufficient.

Thank you in advance!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hello all,

I need a formula that will accomplish the following...

I want to look in cell AQ2 and if it is not blank, I need to look at the values in cells A4 & AN4. Then look down both columns A & AN until I locate the last row in which the values in columns A & AN mirror those of cells A4 & AN4, and return the value in column D of that particular row.

I hope this information is sufficient.

Thank you in advance!
Does that mean these values may appear together on more than one row?
 
Upvote 0
Hi T. Valko,

Yes, the values in column A & AN will appear together in more than one row. However, the file is sorted by column AN so you will not have very far to go to locate the last row where the values in column A & AN match.

Thanks!
 
Upvote 0
Hi T. Valko,

Yes, the values in column A & AN will appear together in more than one row. However, the file is sorted by column AN so you will not have very far to go to locate the last row where the values in column A & AN match.

Thanks!
OK, what version of Excel are you using?
 
Upvote 0
Hi T. Valko,

I wanted to clarify my last statement. When I said you will not have far to go to located the last row in which the values in columns A & AN match, I mean these values match from the first row, not that the values in columns A & AN match each other, they will never match.

Column A has a date and column AN has a unique part number. I just want to locate the last row in which this date and part number are identical to those in row 4 (original email) and return the value in column D of that last row.

Thanks again!
 
Upvote 0
Hi T. Valko,

I wanted to clarify my last statement. When I said you will not have far to go to located the last row in which the values in columns A & AN match, I mean these values match from the first row, not that the values in columns A & AN match each other, they will never match.

Column A has a date and column AN has a unique part number. I just want to locate the last row in which this date and part number are identical to those in row 4 (original email) and return the value in column D of that last row.

Thanks again!
Try this...

Criteria in A4 and AN4.

Data in the ranges A6:A15, D6:D15, AN6:AN15.

=IF(AQ2="","",INDEX(D:D,LOOKUP(2,1/((A6:A15=A4)*(AN6:AN15=AN4)),ROW(A6:A15))))
 
Upvote 0
Hi T. Valko,

I was hoping you could explain to me or point me in a direction to better understand exactly what your formula is telling excel to do. I think I understand the index and lookup portion, but am curious about the the 2,1 prior to the lookup and the last part with ROW(A6:A15))))

Thanks for all you help!
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

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