Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Find second blank row | Excel Discussion (Misc queries) | |||
How to find first blank row to paste to? | Excel Programming | |||
VB: Find blank row then add another blank row | Excel Programming | |||
VB: How do I find next blank row then add another blank row | Excel Programming |