Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am new to VB with Excel 2002 and I am a lost goose right about now. I am trying to move different columns of text data to a single column i.e. Column E to column A. Col D to Col A. Col C to Col A. and Col to Col A. Each column has different size rows. The columns and ro sizes change from day to day, so I need a macro that will recogniz different size columns and rows. Today I have columns A through E with different length rows. I am not sure how to identify the array size, since it will be changin each time I export the data from another database. Once I have the dat in Excel then I need to automatically move ( cut and paste ) or whatever, to populate column A with all the dat from the other columns. I do not care how the data is stacked initiall in column A. I can do a sort, in the macro, once the data is in colum A. I performed this task with the Excel VB recorder and came up th following code for known cells or array size. My problem is that th array size, i.e. column and row size will change each time I export ne data from other database. Sub MoveColumnsToA() ' ' MoveColumnsToA Macro ' Macro recorded 2/26/2004 by willik ' ' Range("E1:E11").Select Selection.Cut ActiveWindow.ScrollRow = 2 ActiveWindow.ScrollRow = 4 ActiveWindow.ScrollRow = 11 ActiveWindow.ScrollRow = 25 ActiveWindow.ScrollRow = 42 ActiveWindow.ScrollRow = 61 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print multiple columns from single column data? | Excel Discussion (Misc queries) | |||
Move Data from one column to many columns | Excel Discussion (Misc queries) | |||
How do I print a single column of data in two columns on one page | Excel Discussion (Misc queries) | |||
merge data from multiple columns to single column | Excel Worksheet Functions | |||
how to convert multiple columns of data into one single column? | Excel Worksheet Functions |