ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Working with multiple columns (https://www.excelbanter.com/excel-programming/424233-working-multiple-columns.html)

RSteph

Working with multiple columns
 
What is the most efficient way to select a group of columns for the purposes
of Deleting unwanted columns, or for editing/formatting a group of columns
all at once?

I'm creating a macro so that I can dump some raw data into a spreadsheet,
then run the macro and it will format everything for me. I want to remove a
block of unneeded columns from the data though (i.e. columns B-F). Then I
want to do some general formatting of columns (i.e. removing borders,
backgound colors, re-sizing, etc.)

I'm sure this is pretty easy, it's just been a while since I've done much
with Excel and Macros, and I'm drawing a mental blank. Any help would be
greatly appreciated.

Thank you.

Don Guillett

Working with multiple columns
 
Range("a1:d1,m1,x1").entirecolumn.delete

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"RSteph" wrote in message
...
What is the most efficient way to select a group of columns for the
purposes
of Deleting unwanted columns, or for editing/formatting a group of columns
all at once?

I'm creating a macro so that I can dump some raw data into a spreadsheet,
then run the macro and it will format everything for me. I want to remove
a
block of unneeded columns from the data though (i.e. columns B-F). Then I
want to do some general formatting of columns (i.e. removing borders,
backgound colors, re-sizing, etc.)

I'm sure this is pretty easy, it's just been a while since I've done much
with Excel and Macros, and I'm drawing a mental blank. Any help would be
greatly appreciated.

Thank you.



JLGWhiz

Working with multiple columns
 
For removing borders in a range of cells.

Sub dk()
Sheets(1).Range("D4:I10").Borders.LineStyle = xlNone
End Sub


"RSteph" wrote:

What is the most efficient way to select a group of columns for the purposes
of Deleting unwanted columns, or for editing/formatting a group of columns
all at once?

I'm creating a macro so that I can dump some raw data into a spreadsheet,
then run the macro and it will format everything for me. I want to remove a
block of unneeded columns from the data though (i.e. columns B-F). Then I
want to do some general formatting of columns (i.e. removing borders,
backgound colors, re-sizing, etc.)

I'm sure this is pretty easy, it's just been a while since I've done much
with Excel and Macros, and I'm drawing a mental blank. Any help would be
greatly appreciated.

Thank you.



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

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