Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
pol pol is offline
external usenet poster
 
Posts: 129
Default To find row is empty or not

Hi all,

I kindly request your help how to find a row is empty row. For example in
my following code I have to give one more condition also like



if rowcount = currow and rowcount is not empty // How I can give the
condition

Original code as follows

LastRow = Range("G" & Rows.Count).End(xlUp).Row
currow = ActiveCell.Row

For RowCount = 1 To LastRow
If RowCount = currow Then // I need to check row is empty or not
If Range("A" & RowCount) = "" Or Range("A" & RowCount) = 0 Then
Range("A" & RowCount) = Col_A
Else
Col_A = Range("A" & RowCount)
End If
end if
Next

With thanks
Pol
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default To find row is empty or not


countnonblanks = Application.WorksheetFunction.CountA(Rows(2))
If countnonblanks 0 Then

End If

"pol" wrote:

Hi all,

I kindly request your help how to find a row is empty row. For example in
my following code I have to give one more condition also like



if rowcount = currow and rowcount is not empty // How I can give the
condition

Original code as follows

LastRow = Range("G" & Rows.Count).End(xlUp).Row
currow = ActiveCell.Row

For RowCount = 1 To LastRow
If RowCount = currow Then // I need to check row is empty or not
If Range("A" & RowCount) = "" Or Range("A" & RowCount) = 0 Then
Range("A" & RowCount) = Col_A
Else
Col_A = Range("A" & RowCount)
End If
end if
Next

With thanks
Pol

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default To find row is empty or not

Perhaps something like:

If RowCount = currow And _
WorksheetFunction.CountA(Cells(RowCount, 1).EntireRow) 0 Then
'...etc.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"pol" wrote:

Hi all,

I kindly request your help how to find a row is empty row. For example in
my following code I have to give one more condition also like



if rowcount = currow and rowcount is not empty // How I can give the
condition

Original code as follows

LastRow = Range("G" & Rows.Count).End(xlUp).Row
currow = ActiveCell.Row

For RowCount = 1 To LastRow
If RowCount = currow Then // I need to check row is empty or not
If Range("A" & RowCount) = "" Or Range("A" & RowCount) = 0 Then
Range("A" & RowCount) = Col_A
Else
Col_A = Range("A" & RowCount)
End If
end if
Next

With thanks
Pol

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 empty row [email protected] Excel Discussion (Misc queries) 3 July 29th 06 07:52 PM
How to find next value if rows between are empty? joes Excel Discussion (Misc queries) 2 June 16th 06 04:26 PM
find the next empty row ASU Excel Discussion (Misc queries) 2 June 12th 06 10:05 AM
find last none empty cell kevcar40 Excel Discussion (Misc queries) 3 March 1st 06 11:59 AM
Find an empty cell and put a dash in it? markexcel Excel Worksheet Functions 5 October 12th 05 03:47 PM


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

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

About Us

"It's about Microsoft Excel"