ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Change excel columns through macros (https://www.excelbanter.com/excel-discussion-misc-queries/142247-change-excel-columns-through-macros.html)

Chandrasekaran P

Change excel columns through macros
 
Hi,

i downloading datas as CSV format,then i restore as XLSX extention.I want to
whether possible to reorder the columns while downloading else how can i
rearrange the columns through macro's.



oli merge

Change excel columns through macros
 
Just a thought, but if you use the macro recorder to see what the code is for
copy then pasting a whole column, you should be able to build up from there i
think.

This is what I got for moving one column and INSERTING it (rather than
pasting over another column) somewhere else:

Columns("C:C").Select
Selection.Copy
Columns("D:D").Select
Selection.Insert Shift:=xlToRight

If you put play around with that I think you should find one way of doing
it, maybe not the best tho

"Chandrasekaran P" wrote:

Hi,

i downloading datas as CSV format,then i restore as XLSX extention.I want to
whether possible to reorder the columns while downloading else how can i
rearrange the columns through macro's.



yaling

Change excel columns through macros
 
Hello Oli Merge,

I have a company name list with thousands of companies. I have insert equal
blank rows between each two companies. I need the company name to copy
themselves in the following blank rows. Do you know how to do that? Any tips
will be highly appreciated.

Yaling

"oli merge" wrote:

Just a thought, but if you use the macro recorder to see what the code is for
copy then pasting a whole column, you should be able to build up from there i
think.

This is what I got for moving one column and INSERTING it (rather than
pasting over another column) somewhere else:

Columns("C:C").Select
Selection.Copy
Columns("D:D").Select
Selection.Insert Shift:=xlToRight

If you put play around with that I think you should find one way of doing
it, maybe not the best tho

"Chandrasekaran P" wrote:

Hi,

i downloading datas as CSV format,then i restore as XLSX extention.I want to
whether possible to reorder the columns while downloading else how can i
rearrange the columns through macro's.



Gord Dibben

Change excel columns through macros
 
See response to your other thread about inserting rows and duplicating the names
into the blank rows.

One thread at a time please.


Gord Dibben MS Excel MVP


On Thu, 10 May 2007 11:58:03 -0700, yaling
wrote:

Hello Oli Merge,

I have a company name list with thousands of companies. I have insert equal
blank rows between each two companies. I need the company name to copy
themselves in the following blank rows. Do you know how to do that? Any tips
will be highly appreciated.

Yaling

"oli merge" wrote:

Just a thought, but if you use the macro recorder to see what the code is for
copy then pasting a whole column, you should be able to build up from there i
think.

This is what I got for moving one column and INSERTING it (rather than
pasting over another column) somewhere else:

Columns("C:C").Select
Selection.Copy
Columns("D:D").Select
Selection.Insert Shift:=xlToRight

If you put play around with that I think you should find one way of doing
it, maybe not the best tho

"Chandrasekaran P" wrote:

Hi,

i downloading datas as CSV format,then i restore as XLSX extention.I want to
whether possible to reorder the columns while downloading else how can i
rearrange the columns through macro's.





All times are GMT +1. The time now is 08:16 PM.

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