#1
|
|||
|
|||
eliminating blan rows between cells in a column cantaining data
The assistance I have previously received in this Forum has been excellent.
I am thanking you in advance for any assistance regarding the following issue. I have a column consisting of predictable data categories such as the following: Column "A" aaaa bbbb cccc dddd eeee Unfortunately, the data is available to me with an unknown number of blank rows separating them such as: Column "A" "aaaa" "bbbb" "cccc" "dddd" "eeee" The number of blank rows is inconsistent from one source to the next. I would like a procedure that will eliminate any blank rows between the values "aaaa" through "eeee". In addition, the nature of the beast is such that filter sorting is not an option. |
#2
|
|||
|
|||
If your data starts in A1 and there is nothing in column A below "eeee", this should work
Code:
Range("A1", Cells(Rows.Count, "A").End(xlUp)).SpecialCells(xlBlanks).EntireRow.Delete |
#3
|
|||
|
|||
NoSparks...Thank you very much for your input. Will try this tomorrow...after good nights sleep.
|
#4
|
|||
|
|||
If I just wanted to delete the blank cells, to what would I change "EntireRow.Delete" ?
|
#5
|
|||
|
|||
Could not wait till tomorrow. If there are blank cells it works great, but if there are no blank cells then I get an error message saying no cells found and it interrupts the procedure.
|
#6
|
|||
|
|||
Another thing raised its ugly head. Commas are an issue as well as blank cells. Assuming another line of code, to what would I change (xlBlanks) to get rid of the commas?
|
#7
|
|||
|
|||
Think you need to clarify what you're trying to do and what you're trying to do it with.
Posting a (de-sensitized) sample workbook with a 'before' and 'after' example would have us all dealing with the same thing. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Merge duplicate rows but retain data from one column | Willem113 | Excel | 1 | 09-21-2016 05:42 PM |
Macro for Column to Rows Data | brunssl2 | Excel Programming | 3 | 04-28-2014 07:07 AM |
How to send several rows of data from one column to each recipient in one go | mikustykus | Mail Merge | 14 | 09-30-2013 08:32 AM |
Eliminating zeros, null values and negatives in a column | jannie | Excel | 1 | 06-22-2011 07:03 PM |
Count range cells eliminating merge cells | danbenedek | Excel | 0 | 06-15-2010 12:40 AM |