Position of nth non-blank cell

redart

Board Regular
Joined
Oct 15, 2002
Messages
246
Office Version
  1. 2007
Platform
  1. Windows
Hi,
I have a column of numbers that contains randomly positioned blank cells. I'm trying to use the Match function to get the position (row number) at which the count of non-blank cells equals 12, something like
=MATCH(TRUE,count(A1:A50)=12,0)

however I keep getting the #N/A error. Can anyone tell me why this wont work, or suggest an alternative way of doing this ?.

Thanks.
 
This regular formula returns the row number of the 12th non-blank cell in A1:A50 (counting from the last non-blank cell)
Code:
=LARGE(INDEX((A1:INDEX(A:A,LOOKUP(2,1/(A1:A50<>""),ROW(A1:A50)))<>"")
*ROW(A1:INDEX(A:A,LOOKUP(2,1/(A1:A50<>""),ROW(A1:A50)))),0),12))

Is that something you can work with?

This may be old, but works great with an indirect() reference! Couldn't get it to work from the top down rather than the bottom up, I always got an error, but I was able to work with it to dynamically show matched data members from an event list!

Great work Ron - greatly appreciated - particularly as it's not an Array Formula! !

:cool::cool::cool:

Cheers
B
 
Last edited:
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,949
Latest member
Dupuhini

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