Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 180
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Find second blank row singlgl1 Excel Discussion (Misc queries) 2 November 26th 05 05:44 PM
How to find first blank row to paste to? Judy Ward Excel Programming 1 August 26th 05 12:48 AM
VB: Find blank row then add another blank row Tbal[_3_] Excel Programming 1 July 18th 05 08:33 PM
VB: How do I find next blank row then add another blank row TB Excel Programming 1 July 18th 05 08:33 PM


All times are GMT +1. The time now is 01:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"