Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I test for nulls within a range without specifying each ce | Excel Discussion (Misc queries) | |||
Nulls within a .Find command | Excel Programming | |||
replace zeros with nulls | Excel Discussion (Misc queries) | |||
replace zeros with nulls | Excel Discussion (Misc queries) | |||
deaking with nulls, I think... | Excel Programming |