![]() |
Find second blank row
Can someone edit this so that it will find the second blank row instead of the first blank row? Thanks Function FindBlankRow() x = 2 Do While ActiveSheet.Cells(x, 1) < "" x = x + 1 Loop FindBlankRow = x - 1 -- singlgl1 ------------------------------------------------------------------------ singlgl1's Profile: http://www.excelforum.com/member.php...o&userid=26389 View this thread: http://www.excelforum.com/showthread...hreadid=488377 |
Find second blank row
Function SecondBlankRow()
Dim CountToGo, CurRow As Long CountToGo = 2 CurRow = 2 Do While CountToGo 0 If ActiveSheet.Cells(CurRow, 1) = "" Then CountToGo = CountToGo - 1 CurRow = CurRow + 1 Loop SecondBlankRow = CurRow - 1 End Function Note that this isn't really finding the 2nd blank row, but rather the 2nd row (ignoring row 1) that has a blank cell in column A (that's true of this function as well as your original). --Bruce "singlgl1" wrote: Can someone edit this so that it will find the second blank row instead of the first blank row? Thanks Function FindBlankRow() x = 2 Do While ActiveSheet.Cells(x, 1) < "" x = x + 1 Loop FindBlankRow = x - 1 -- singlgl1 ------------------------------------------------------------------------ singlgl1's Profile: http://www.excelforum.com/member.php...o&userid=26389 View this thread: http://www.excelforum.com/showthread...hreadid=488377 |
All times are GMT +1. The time now is 06:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com