find nth occurence

GinoZ

Board Regular
Joined
Feb 6, 2006
Messages
169
Hey guys,

i have an array with the following layout

Code:
A       3
B       3 
V       2 
F       1 
G       2 
H       4

I want to find every 2 in the array. When it is found, i need to display the letter. Example:
V
G

The array DOES contain blank rows
Thanks in advance

GinoZ
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
GinoZ,
VLOOKUP HLOOKUP to return multiple results.xls
ABCDEFGHIJK
1A3NumberofInterest
2B32VH2=IF(ROWS(H$2:H2)>$G$5,"",INDEX($A$1:$B$9,SMALL(IF($A$1:$B$9=$G$2,ROW($A$1:$B$9)),ROW(1:1)),COLUMNS($A2:A2)))
3V2G
4F1No.ofRows 
5G22 
6H4 
7 
8 
9 
10
11G5=COUNTIF(B1:B9,G2)
12
Sheet2



The formula in cell G5:
=COUNTIF(B1:B9,G2)

The formula in cell H2:
=IF(ROWS(H$2:H2)>$G$5,"",INDEX($A$1:$B$9,SMALL(IF($A$1:$B$9=$G$2,ROW($A$1:$B$9)),ROW(1:1)),COLUMNS($A2:A2)))

When you paste the formula into cell H2, you want to confirm it with CTRL + SHIFT + Enter (because this is an array formula.

Copy H2 down to H9.


Make canges to cell G2.

Have a great day,
Stan
 
Upvote 0

Forum statistics

Threads
1,222,246
Messages
6,164,807
Members
451,917
Latest member
WEB78

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