match an array with a criteria then outputs row number of ma

edy

New Member
Joined
Oct 31, 2002
Messages
3
hi,
i'm trying to search for matches on an array (a1:a4)with b1 then B2 and so on as the criteria. Then display the row number as an output (column c)as shown

a b c
1 6 7 2
2 7 8 3
3 8 6 1
4 9 12 7
5 10
6 11
7 12
i have try this statement
if (countif ($a$1:$a$7,b1),row()
it just won't dislay the right row number of the match. all the entries for A and b are unique.

thanks
This message was edited by edy on 2002-11-01 00:37
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

eliW

Well-known Member
Joined
Mar 2, 2002
Messages
1,934
On 2002-11-01 00:36, edy wrote:
hi,
i'm trying to search for matches on an array (a1:a4)with b1 then B2 and so on as the criteria. Then display the row number as an output (column c)as shown

a b c
1 6 7 2
2 7 8 3
3 8 6 1
4 9 12 7
5 10
6 11
7 12
i have try this statement
if (countif ($a$1:$a$7,b1),row()
it just won't dislay the right row number of the match. all the entries for A and b are unique.

thanks
This message was edited by edy on 2002-11-01 00:37
Hi edy and welcome to the board.

You can use simple MATCH here which will do exactly what you need:

=MATCH(B1,$A$1:$A$7)

Copy to other rows.

Eli
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
Hi edy:

Welcome to the Board!

You can use the following formula in cell C1 and then copy down:

=MATCH(B1,$A$1:$A$7,0)

or you can use the following array formula:

{=MATCH(B1:B4,$A$1:$A$7,0)}

Regards!
Yogi Anand
 

Forum statistics

Threads
1,144,741
Messages
5,726,017
Members
422,653
Latest member
mntsiki

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