ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro selecting blank rows/columns (https://www.excelbanter.com/excel-programming/296493-macro-selecting-blank-rows-columns.html)

Floss

Macro selecting blank rows/columns
 
I have a macro that pastes data as values to a worksheet. After paste is done I need a method to delete all of blank rows and columns, order of delete is not important.

Problem is the that pasted data field contains blank cells in an otherwise populated row and/or column which need to remain and should not be deleted. Need help to figure out a method of taking out entirely blank rows and columns of the pasted data in a macro. Note this function must use the pasted data only and not the original user selected copied data

Another method I am trying to stay away from is to sort data rows/columns in descending order which would then force the blank rows and columns to the outside edge of the data field. Doing this will change the original sort order that user is not comfortable with

Thank you in advance for all of your invaluable sugestions and assistance in this matter

Floss

Frank Kabel

Macro selecting blank rows/columns
 
Hi
have a look at
http://www.cpearson.com/excel/deleti...eleteBlankRows

--
Regards
Frank Kabel
Frankfurt, Germany


floss wrote:
I have a macro that pastes data as values to a worksheet. After
paste is done I need a method to delete all of blank rows and
columns, order of delete is not important.

Problem is the that pasted data field contains blank cells in an
otherwise populated row and/or column which need to remain and should
not be deleted. Need help to figure out a method of taking out
entirely blank rows and columns of the pasted data in a macro. Note
this function must use the pasted data only and not the original user
selected copied data.

Another method I am trying to stay away from is to sort data
rows/columns in descending order which would then force the blank
rows and columns to the outside edge of the data field. Doing this
will change the original sort order that user is not comfortable
with.

Thank you in advance for all of your invaluable sugestions and
assistance in this matter.

Floss




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com