combining row() with a vlookup

robertdseals

Active Member
Joined
May 14, 2008
Messages
337
Office Version
  1. 2010
Platform
  1. Windows
Hello,
I would like to combine row() with a vlookup. So, if my data set looked like:
a b c
1 Apple
2 Banana

and down on row 17 I had
17 Apple

I would want to put in a formula that would be something similar to:
=row(vlookup(A17,A1:A2,1,0)) that would vlookup "apple" in cells A1 - A2 and return the row number that it is on. Any ideas?
 

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
Take a look at the MATCH function.

MATCH returns the row number if a match is found.

Given your vlookup formula, you should be able to do =MATCH(A17,A1:A2,0)
 
Upvote 0
That would only work if they lined up right. What if my data set started on A6? Match would still give me an answer of 1 when what I want to know is what row is this on.
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,949
Latest member
Dupuhini

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