# Index/Match for Nonblanks

#### StorminASU

##### New Member
Hello Everyone,
I'm designing a sheet that is to be used as a tally for a strawman poll before a real vote is held on some projects being considered at my company. Some of these polls will have comments on them when returned. I'd like to list all comments, though most will be blank with no comments.

I have attached a sample of the worksheet, but I cannot get my index/match (I am terrible at this formula base; vlookup is my comfort zone) to return all non-blanks, while ignoring the "Comments" header which is there to facilitate data entry.

Can anyone please help me with this, and maybe the logic of how to understand index/match going forward?

### Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

#### Aryatect

##### Active Member
Hi,

See if this works for cell Q8

Code:
``=INDEX(E24:E323,MATCH(1,INDEX((E24:E323 <> "")*(ISERROR(SEARCH("Comments",E24:E323))),0,0),0))``

#### StorminASU

##### New Member
Hi,

See if this works for cell Q8

Code:
``=INDEX(E24:E323,MATCH(1,INDEX((E24:E323 <> "")*(ISERROR(SEARCH("Comments",E24:E323))),0,0),0))``
Aryatect,
Thanks so much for your help! The formula in Q8 did pull the first comment, but did not continue pulling other comments below it. The formula simply kept returning the first comment only as I dragged the formula to Q9, Q10, etc. Thanks so much for the great start though, that's way more than I was getting.

#### Aryatect

##### Active Member
Hi,

Try this

Code:
``=IFERROR(INDEX(\$E\$25:\$E\$325,AGGREGATE(15,6,(ROW(\$E\$25:\$E\$325)-ROW(\$E\$25)+1)/((MATCH(\$E\$25:\$E\$325,\$E\$25:\$E\$325,0)=ROW(\$E\$25:\$E\$325)-ROW(\$E\$25)+1)*(\$E\$25:\$E\$325 <> "")*(ISERROR(SEARCH("Comments",\$E\$25:\$E\$325)))),ROWS(Q\$8:Q8))),"")``
in Q8 and copy it down

Last edited:

#### StorminASU

##### New Member
Hi,

Try this

Code:
``=IFERROR(INDEX(\$E\$25:\$E\$325,AGGREGATE(15,6,(ROW(\$E\$25:\$E\$325)-ROW(\$E\$25)+1)/((MATCH(\$E\$25:\$E\$325,\$E\$25:\$E\$325,0)=ROW(\$E\$25:\$E\$325)-ROW(\$E\$25)+1)*(\$E\$25:\$E\$325 <> "")*(ISERROR(SEARCH("Comments",\$E\$25:\$E\$325)))),ROWS(Q\$8:Q8))),"")``
in Q8 and copy it down
I can't thank you enough Aryatect. Do you recommend any resources to learn how to use this power?

#### Aryatect

##### Active Member

I am a big fan of Mike "excelisfun" Girvin. He has a youtube channel by name "excelisfun" with lots of information.

Last edited:

#### StorminASU

##### New Member

I am a big fan of Mike "excelisfun" Girvin. He has a youtube channel by name "excelisfun" with lots of information.
Thank you again, works perfectly!

#### Aryatect

##### Active Member
Thank you for the feedback

1,089,299
Messages
5,407,451
Members
403,143
Latest member
CTremblay