Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Count of rows with nulls

I've created code previously where I deleted rows based on certain
criteria being found in that row. In doing so I had the code below
that did a count of rows in column a. This code assumed that there
were no blank cells in column a. How would I change this code if I
don't have any columns in my data where there are no blank cell?.

For k = Cells(Rows.Count, "a").End(xlUp).Row To 1 Step -1
If Cells(k, "a") = "GMEIS" Then Rows(k).EntireRow.Delete
Next k

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Count of rows with nulls

Hi tbmarlie,

I'm not entirely sure what you are trying to do. You say "How would I change
this code if I don't have any columns in my data where there are no blank
cell?" So you are saying what if you DO have columns WITH blank cells. As far
as I can see your current code will delete rows that contain "GMEIS" in
column A, and should work if there are blank cells in column.

If you could help me to understand better what you are trying to achieve I
will do my best to help.

Sean.


--
(please remember to click yes if replies you receive are helpful to you)


"tbmarlie" wrote:

I've created code previously where I deleted rows based on certain
criteria being found in that row. In doing so I had the code below
that did a count of rows in column a. This code assumed that there
were no blank cells in column a. How would I change this code if I
don't have any columns in my data where there are no blank cell?.

For k = Cells(Rows.Count, "a").End(xlUp).Row To 1 Step -1
If Cells(k, "a") = "GMEIS" Then Rows(k).EntireRow.Delete
Next k

Thanks


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
How can I test for nulls within a range without specifying each ce Houston Excel Discussion (Misc queries) 2 March 25th 10 05:50 PM
Nulls within a .Find command Kevin Porter Excel Programming 7 June 15th 07 02:51 PM
replace zeros with nulls dharshanie Excel Discussion (Misc queries) 4 March 31st 06 04:10 PM
replace zeros with nulls dharshanie Excel Discussion (Misc queries) 0 March 31st 06 02:03 PM
deaking with nulls, I think... Jim May Excel Programming 2 October 9th 05 06:43 PM


All times are GMT +1. The time now is 01:14 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"