# Return row number of blank row

#### straubj

##### New Member
I have a set of spreadsheets and each one has a blank line somewhere in the middle area. I need a formula that I can place at the bottom of each spreadsheet that returns the row number of the blank row. Alternatively, finding one blank cell and returning its row number would work as well if there is a way to do that. All help is very appreciated!

#### Rick Rothstein

##### MrExcel MVP
Assuming for your alternate that Column A is the column that is filled with data except for the blank cell you want to find. Let's say the last data cell in Column A is located at Row 20, then use this formula to find the row number with the blank cell...

=SUMPRODUCT((A1:A20="")*ROW(A1:A20))

#### straubj

##### New Member
Found a solution

=SMALL(IF(\$A\$1:\$A\$1080="",ROW(INDIRECT("1:"&ROWS(\$A\$1:\$A\$1080))),""),ROW(1:1))

Thanks!

##### MrExcel MVP
I have a set of spreadsheets and each one has a blank line somewhere in the middle area. I need a formula that I can place at the bottom of each spreadsheet that returns the row number of the blank row. Alternatively, finding one blank cell and returning its row number would work as well if there is a way to do that. All help is very appreciated!
Control+shift+enter, not just enter:

=MATCH(TRUE,ISBLANK(A2:A100),0)+ROW(A2)-1

=MATCH(TRUE,A2:A100="",0)

Native row numbers:

Control+shift+enter, not just enter...

=MATCH(TRUE,ISBLANK(A2:A100),0)+ROW(A2)-1

=MATCH(TRUE,A2:A100="",0)+ROW(A2)-1

#### Rick Rothstein

##### MrExcel MVP
Found a solution

=SMALL(IF(\$A\$1:\$A\$1080="",ROW(INDIRECT("1:"&ROWS(\$A\$1:\$A\$1080))),""),ROW(1:1))
SMALL? You needed to use the SMALL function? Why, because you have more than one blank row? Does that mean you misled us? Everything about your first post said you only had a single blank row. Here is what you said (I highlighted the relevant parts)...
I have a set of spreadsheets and each one has a blank line somewhere in the middle area. I need a formula that I can place at the bottom of each spreadsheet that returns the row number of the blank row. Alternatively, finding one blank cell and returning its row number would workas well if there is a way to do that. All help is very appreciated!

Last edited:

#### straubj

##### New Member
everything I said is true. there is only one blank line. My friend helped me with that formula. To be honest, I have no idea why it works, but it does.

#### Rick Rothstein

##### MrExcel MVP
everything I said is true. there is only one blank line. My friend helped me with that formula. To be honest, I have no idea why it works, but it does.
Okay, let me ask then... did you try any of the shorter, non-volatile formulas that have been offered to you in this thread in response to the question you asked here?

1,081,418
Messages
5,358,567
Members
400,504
Latest member
RedSquirrel

### This Week's Hot Topics

• VBA (Userform)
Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
• List box that changes fill color
Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
• Remove duplicates and retain one. Cross-linked cases
Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
• VBA Copy and Paste With Duplicates
Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
• Macro
is it possible for a macro to run if the active cell value is different to the value above it
• IF DATE and TIME
I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...