Nth non blank cell

bone2663

New Member
Joined
Jun 19, 2011
Messages
6
I am trying to find a formula that will return the nth non blank cell in an array (C4:c100)
In cells c4 to c19 is formula that will return "" then in c20 formula returns 0430-0830.then c21 is formula that returns "" and so on.
I am wanting to get all of the non "" cells.
eg
d1= first non "" in array c4:c100
d2= 2nd non "" in array c4:c100
etc

help please
 
get an error posted to many arguements and the "" highlited when ctrl shift enter

D1:

=SUMPRODUCT(1-($C$4:$C$100=""))

D2, control+shift+enter, not just enter, and copy down:

=IF(ROWS($D$2:D2)<=$D$1,INDEX($C$4:$C$100,SMALL(IF(1-($C$4:$C$100=""),ROW($C$4:$C$100)-ROW($C$4)+1),ROWS($D$2:D2),"")
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
This CSE formula will return the first non blank cell in C4:C100
=INDEX(C:C,SMALL(ROW($C$4:$C$100)+(100*($C$4:$C$100="")), 1))&""

This will return the second
=INDEX(C:C,SMALL(ROW($C$4:$C$100)+(100*($C$4:$C$100="")), 2))&""

This could be entered into a cell and dragged down
=INDEX(C:C,SMALL(ROW($C$4:$C$100)+(100*($C$4:$C$100="")), ROW(A1)))&""

All these formulas should be entered with Ctrl-Shift-Enter (Cmd+Return for Mac)
3rd one worked fantastic, thanx heaps all
 
Upvote 0
d1:

=sumproduct(1-($c$4:$c$100=""))

d2, control+shift+enter, not just enter, and copy down:

=if(rows($d$2:d2)<=$d$1,index($c$4:$c$100,small(if(1-($c$4:$c$100=""),row($c$4:$c$100)-row($c$4)+1),rows($d$2:d2),"")

d2:

=if(rows($d$2:d2)<=$d$1,index($c$4:$c$100,small(if(1-($c$4:$c$100=""),row($c$4:$c$100)-row($c$4)+1),rows($d$2:d2))),"")
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

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