Array Formula - Doesn't Repeat

laurenm

New Member
Joined
Nov 1, 2018
Messages
4
I found an array formula online that helped me get a result for the 1st, 2nd, 3rd, etc. non-blank cell in a column.

Formula:
=INDEX(A$1:A$80,SMALL(ROW(A$1:<wbr>A$80)+(100*(A$1:A$80="")), 1))&""

(the "1" at the end of the formula determines which non-blank result to output).

I used this formula 10 times to get the first 10 non-blank cells in column A. However, I don't want to get any repeats - for example, if the 3rd non-blank cell and the 5th non-blank cell are both "California" then I don't want the formula to register the 5th non-blank cell, and it will move on to the next non-blank cell.

Is there a way to update this array formula for this?

I can't figure out how to upload the doc, but the column data, formula, and results I get/want are below (don't want California to show up because it is a repeat):

<strike></strike>
DataFormulaCurrent ResultsResults I want
CaliforniaINDEX(A$1:A$80,SMALL(ROW(A$1:<wbr style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">A$80)+(100*(A$1:A$80="")), 1))&""<strike></strike>
CaliforniaCalifornia
GeorgiaINDEX(A$1:A$80,SMALL(ROW(A$1:<wbr style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">A$80)+(100*(A$1:A$80="")), 2))&""<strike></strike>
GeorgiaGeorgia
INDEX(A$1:A$80,SMALL(ROW(A$1:<wbr style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">A$80)+(100*(A$1:A$80="")), 3))&""<strike></strike>
South CarolinaSouth Carolina
INDEX(A$1:A$80,SMALL(ROW(A$1:<wbr style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">A$80)+(100*(A$1:A$80="")), 4))&""<strike></strike>
TennesseeTennessee
South CarolinaINDEX(A$1:A$80,SMALL(ROW(A$1:<wbr style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">A$80)+(100*(A$1:A$80="")), 5))&""<strike></strike>
CaliforniaOregon
INDEX(A$1:A$80,SMALL(ROW(A$1:
<wbr style="background-color: rgb(255, 255, 255); color: rgb(34, 34, 34); font-family: Arial,Helvetica,sans-serif; font-size: 13.33px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; widows: 2; word-spacing: 0px;">
A$80)+(100*(A$1:A$80="")), 6))&""
<strike style="background-color: transparent; border-collapse: collapse; color: rgb(34, 34, 34); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: line-through; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; width: auto; word-spacing: 0px;"></strike><strike></strike>
<strike></strike>Oregon
Tennessee
California
Oregon

<tbody>
</tbody>

<strike></strike>



<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try:
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
AB
1CaliforniaCalifornia
2GeorgiaGeorgia
3South Carolina
4Tennessee
5South CarolinaOregon
6
7
8Tennessee
9
10California
11
12Oregon
Sheet
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,215,541
Messages
6,125,413
Members
449,223
Latest member
Narrian

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