Deleting A COLUMN BY MACRO

S

satish_vemuri

HI all,

every month i geenrate reports. from ms-access i export the reports t
excel. i have various colmns which i dont requier. i need to delete the
manually.
the columns are random.
From A - Z columns the data is filled. most of the columns i don
requier. by using a macro can i deleted these unwanted columns.

how i can do this. my desk is full load of work.i am new to excel to.

can some one please help me in this regards.
i am great ful to all.

Thanks
VE
 
R

Ron Rosenfeld

HI all,

every month i geenrate reports. from ms-access i export the reports to
excel. i have various colmns which i dont requier. i need to delete them
manually.
the columns are random.
From A - Z columns the data is filled. most of the columns i dont
requier. by using a macro can i deleted these unwanted columns.

how i can do this. my desk is full load of work.i am new to excel to.

can some one please help me in this regards.
i am great ful to all.

Thanks
VEN

Do you want to delete the entire column, or just the contents of the column?
Are the columns to be deleted the same each month, or are they truly random and change each month?
If the latter, how do you know which one's to delete?
 
S

satish_vemuri

HI all,

Hi Ron,

Thanks for your reply. I need to generate the reports tweice a month.
export the reports from Ms-Access.

I need to delete the columns from the excel. same columns for all th
reports i generate.
Random means.. the columns are not in order like col A, col B ....
first col A , THEN COL C OR COL K LIKE THAT..

I want to delete the columns with data which i dont need for m
reports.

If you need any further details please let me know. i can post th
sample columns as well.

Thank you,


every month i geenrate reports. from ms-access i export the reports t
excel. i have various colmns which i dont requier. i need to delete the
manually.
the columns are random.
From A - Z columns the data is filled. most of the columns i don
requier. by using a macro can i deleted these unwanted columns.

how i can do this. my desk is full load of work.i am new to excel to.

can some one please help me in this regards.
i am great ful to all.

Thanks
VENkat
 
C

Cimjet

HI all,



every month i geenrate reports. from ms-access i export the reports to

excel. i have various colmns which i dont requier. i need to delete them

manually.

the columns are random.

From A - Z columns the data is filled. most of the columns i dont

requier. by using a macro can i deleted these unwanted columns.



how i can do this. my desk is full load of work.i am new to excel to.



can some one please help me in this regards.

i am great ful to all.



Thanks

VEN


Hi
Your not replying to Ron
So this will delete columns, you can edit or add to it.
You could record a macro for what you want or we are not getting the question right.
A reply from you would be good
Regards
Cimjet
 
C

Cimjet

Hi

Your not replying to Ron

So this will delete columns, you can edit or add to it.

You could record a macro for what you want or we are not getting the question right.

A reply from you would be good

Regards

Cimjet
Forgot to post the code:
Sub DeleteColumn()
Range("A:A,C:C,E:E,H:H").Select
Selection.Delete Shift:=xlToLeft
End Sub
 
C

Cimjet

I wish we could edit are post but anyway, here is a one line that will do the same.
Sub DeleteColumn()
Range("A:A,C:C,E:E,H:H").Delete Shift:=xlToLeft
End Sub
Don't need to select the columns
Cimjet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top