LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting new empty row ?

Actually, I wasn't sure if the question had been completely answered, but
you you are probably right, this method is more than likely not what the OP
wanted. However, I still think it is a valid question to develop code for...
Where is the first completely blank row in a set of data? By the way, be
sure to see my revised code and what it was that I revised... it will help
you when studying the SpecialCells (which are linked to the UsedRange).

Rick


"TomPl" wrote in message
...
Actually, I thought his question had already been answer, but I was bored.
I have not used the SpecialCells function but it looks interesting. I
think
I will research it further, but that will have to wait until next week.

Thanks Rick

"Rick Rothstein (MVP - VB)" wrote:

That is an interesting read on the OP's question. On the off-chance you
are
right, this function seems to work using less looping...

Function FirstFullyEmptyRow() As Long
Dim X As Long
On Error Resume Next
With Worksheets("Sheet1")
For X = 1 To .UsedRange.Rows.Count
Err.Clear
If Rows(X).EntireRow.SpecialCells(xlCellTypeBlanks).C ount = _
.UsedRange.Columns.Count Then If Err.Number = 0 Then Exit For
Next
FirstFullyEmptyRow = X
End With
End Function

Rick


"TomPl" wrote in message
...
Now I am thinking that "empty row" means all cells in that row (within
the
specified range) must be blank. You might be able to tell that I was
bored
today, because I did this:

Sub EmptyRow()

Dim ctr As Long
Dim ctc As Long
Dim eCells As Long
Dim rng As Range

'Pick a range, any range, usedRange if you like.
Set rng = ActiveSheet.Range("myRange")

For ctr = 1 To UBound(rng.Value)
eCells = 0
For ctc = 1 To UBound(rng.Value2)
If IsEmpty(rng.Cells(ctr, ctc)) = False Then
eCells = eCells + 1
End If
Next ctc
If eCells = 0 Then
GoTo IsEmpty
End If
Next ctr
ctr = ctr - 1
IsEmpty:
MsgBox ("Empty Row Is Row " & ctr)
End Sub

"kleysonr" wrote:

How can i get the number of the first empty row in a column ?






 
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
Delete Rows with Empty Cells with empty column 1 Scott Excel Programming 5 October 2nd 06 11:57 PM
Finding next empty empty cell in a range of columns UncleBun Excel Programming 1 January 13th 06 11:22 PM
Excel - Autom. Filter "Empty / Non Empty cells" should come first Rom Excel Discussion (Misc queries) 0 August 10th 05 04:32 PM
How can I convert empty strings to empty cells? Shane Excel Discussion (Misc queries) 2 July 19th 05 12:10 PM
Can blank cells created using empty Double-Quotes not be empty?? JohnI in Brisbane Excel Programming 6 September 7th 03 11:22 PM


All times are GMT +1. The time now is 12:36 AM.

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"