Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to find the nth non blank cell in Excel?

How could you find and return the nth non blank cell value from a column or a row in Excel? This article, I will talk about some useful formulas for you to solve this task.

Find and return the nth non blank cell value from a column with formula

Find and return the nth non blank cell value from a row with formula

Excel Productivity Tools

Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial

Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately. 60-day Unlimited Free Trial


arrow blue right bubble Find and return the nth non blank cell value from a column with formula

For example, I have a column of data as following screenshot shown, now, I will get the third non blank cell value from this list.

doc find nth non blank 1

Please enter this formula: =INDEX($A$1:$A$25,SMALL(ROW($A$1:$A$25)+(100*($A$1:$A$25="")), 3))&"" into a blank cell where you want to output the result, D2, for example, and then press Ctrl + Shift + Enter keys together to get the correct result, see screenshot:

doc find nth non blank 2

Note: In above formula, A1:A25 is the data list that you want to use, and the number 3 indicates the third non blank cell value which you want to return, if you want to get the second non blank cell, you just need to change the number 3 to 2 as you need.


arrow blue right bubble Find and return the nth non blank cell value from a row with formula

If you want to find and return the nth non blank cell value in a row, the following formula may help you, please do as this:

Enter this formula: =INDEX($A$1:$M$1,SMALL(IF($A$1:$M$1<>"",COLUMN($A$1:$M$1)-COLUMN($A$1)+1),4)) into a blank cell where you want to locate the result, and then press Ctrl + Shift + Enter keys together to get the result, see screenshot:

doc find nth non blank 3

Note: In above formula, A1:M1 is the row values that you want to use, and the number 4 is the fourth non blank cell value which you want to return, if you want to get the second non blank cell, you just need to change the number 4 to 2 as you need.


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  • Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  • Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  • Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  • No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  • Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  • Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    John · 1 years ago
    Hi everyone!


    Could you also help me return the row number of the second, third non-blank cell?


    Please help me.
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hello, John,
      the following formula can help you to get all the row numbers of the non-blank cells, please try it, thank you!
      =IFERROR(ROW(INDEX($A$1:$A$12,SMALL(INDEX(NOT(ISBLANK($A$1:$A$12))*ROW($A$1:$A$12),0),COUNTBLANK($A$1:$A$12)+ROW(A1)))),"")
  • To post as a guest, your comment is unpublished.
    Jerry · 1 years ago
    Hey everyone,

    I have a table with numerous columns and rows. The rows have range names, and a description/location at the beginning of the row range with its own range, example "Building No.s". There are multiple Row Ranges/ Buildings. There are headers at the top of each columns for specific "Building Assembly Types". The table content is numeric quantities for each type "Building Assembly Type" for each specific "Building" description/location. There could be as many as (100) "Building Assembly Types" column headers but I will limit the assemblies to (10) per row range, so there will be numerous blank cells in each "Building No." range.

    I have other summary tables set up for each "Building" that I want to pull the non-blank cells quantities to, along with the corresponding header "Assembly Type" for each "Building" with a (10) max "Assemblies" per page.

    I can identify the non-blank cell quantities by use of the array formula above for rows. The problem I am having is identifying the header that corresponds to it.

    Ultimately if I can identify the "Assembly" header, I can always index the "Quantities" once I have the header "Assembly" identified for each "Building". Then I would be able do a lookup for all the parts associated with each "Assembly" type for that "Building" from my Assembly parts database and multiply it times the "Quantity" of each assembly type.

    Hopefully this makes since and someone can help.
  • To post as a guest, your comment is unpublished.
    noel · 2 years ago
    Hello,
    I am looking for the third blank row in a column and I copied your formula and just changed the range from $A$1:$A:$25 to my range $D$306:$D$354.
    But when I change the range I get #REF! as my answer.
    I already converted to an array, control-shift-enter.
    Now the cell range I am referencing has formulas in them, so could that be why I am getting #REF.
    Your formula: =INDEX($A$1:$A$25,SMALL(ROW($A$1:$A$25)+(100*($A$1:$A$25="")), 3))&""
    My formula: =INDEX($D$306:$D$354,SMALL(ROW($D$306:$D$354)+(1*($D$306:$D$354="")), 2))&""

    Thanks,
    Noel
    • To post as a guest, your comment is unpublished.
      sumit pandey · 1 years ago
      you have put the 1 instead of 100 therefore answered was wrong. please use below formula

      INDEX($D$306:$D$354,SMALL(ROW($D$306:$D$354)+(100*($D$306:$D$354="")), 3))&"" than ctrl + shift+enter