A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » New Users to Excel
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Deleting A COLUMN BY MACRO



 
 
Thread Tools Display Modes
  #1  
Old August 5th 12, 10:38 PM
Junior Member
 
First recorded activity by ExcelBanter: Aug 2012
Posts: 2
Smile Deleting A COLUMN BY MACRO

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
Ads
  #3  
Old August 6th 12, 04:00 PM
Junior Member
 
First recorded activity by ExcelBanter: Aug 2012
Posts: 2
Smile

;1604370]HI all,

Hi Ron,

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

I need to delete the columns from the excel. same columns for all the 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 my reports.

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

Thank you,


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
VENkata
  #5  
Old August 10th 12, 01:54 PM posted to microsoft.public.excel.newusers
Cimjet[_4_]
external usenet poster
 
Posts: 23
Default Deleting A COLUMN BY MACRO

On Sunday, August 5, 2012 5:38:53 PM UTC-4, satish_vemuri @ hotmail. com wrote:
> 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
  #6  
Old August 10th 12, 02:02 PM posted to microsoft.public.excel.newusers
Cimjet[_4_]
external usenet poster
 
Posts: 23
Default Deleting A COLUMN BY MACRO

On Friday, August 10, 2012 8:54:25 AM UTC-4, Cimjet wrote:
> On Sunday, August 5, 2012 5:38:53 PM UTC-4, satish_vemuri @ hotmail. com wrote:
>
> > 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

Forgot to post the code:
Sub DeleteColumn()
Range("A:A,C:C,E:E,H:H").Select
Selection.Delete Shift:=xlToLeft
End Sub
  #7  
Old August 10th 12, 02:07 PM posted to microsoft.public.excel.newusers
Cimjet[_4_]
external usenet poster
 
Posts: 23
Default Deleting A COLUMN BY MACRO

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
macro for deleting cells trought column A tabašija Excel Programming 6 January 28th 09 10:13 PM
Hiding a column vs. Deleting a Column [email protected] Excel Programming 1 December 21st 08 06:46 PM
HOW DO I ADD ONE COLUMN TO A SECOND WITHOUT DELETING THAT VALUE Nick Excel Programming 5 November 15th 08 04:24 PM
Deleting a row that has a zero in column A Bob Excel Programming 8 March 17th 08 02:10 PM
Deleting cells in a column ref a different column Daminc[_23_] Excel Programming 8 December 23rd 05 05:04 PM


All times are GMT +1. The time now is 04:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2004-2013 ExcelBanter.
The comments are property of their posters.