Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select range of rows/Columns?
Hello,
How do I put in VB code/ macro to selection a range of data in row or column where the number of rows is different each time and # of columns is pretty consistently the same? Anyway, I pull some raw data (several thousand of rows) each time in a word pad format, then I got to select all the rows/ columns with data. Here's the sequences of events that I do manually that I would like to automate with a macro: 1) put the raw data manually starting in column B row 1. 2) number 1 to ... rows with data (not blank) in column A (for sorting/ resorting purposes). To be deleted later. 3) select only rows with data (starting w/ a date info), then apply a "Text to Columns" function to seperate the data to different column. 4) delete all the not needed columns after "text to columns". 5) sort all columns with data by column B, then delete all unnecessary rows 6) resort all columns by column A. 7) delete column A |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select range of rows/Columns?
Turn on the macro recorder, then record your steps, but as modified
below: 1. File|Open the WordPad (text?) file. Let it import into Column A with the remaining data parsed out into the other columns (this can be specified during the file import operation. 2. Select Column A and insert a new column. 3. Select Row 1 and insert a new row, if there are no column labels in your text file. 4. Format Row 1 to be Bold, with cell underline. 5. Delete unneeded columns. 6. Sort by Column B. 7. At this point you will have to figure out how to locate the unnecessary rows and delete them. 8. Resort by Column A. 9. Delete Column A. Post a short example of what raw data you have here, if you can, especially the unnecessary rows. We may be able to provide some help from there. -- Regards, Bill Renaud |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select range of rows/Columns?
Bill,
Thanks for the help. But how can put your sugguestion from 1 to 9 into VB/ macro so I don't have to do it manually each time? "Bill Renaud" wrote: Turn on the macro recorder, then record your steps, but as modified below: 1. File|Open the WordPad (text?) file. Let it import into Column A with the remaining data parsed out into the other columns (this can be specified during the file import operation. 2. Select Column A and insert a new column. 3. Select Row 1 and insert a new row, if there are no column labels in your text file. 4. Format Row 1 to be Bold, with cell underline. 5. Delete unneeded columns. 6. Sort by Column B. 7. At this point you will have to figure out how to locate the unnecessary rows and delete them. 8. Resort by Column A. 9. Delete Column A. Post a short example of what raw data you have here, if you can, especially the unnecessary rows. We may be able to provide some help from there. -- Regards, Bill Renaud |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select range of rows/Columns?
Turn on the macro recorder, then record your steps.
-- Regards, Bill Renaud |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I cant select rows or columns | Excel Discussion (Misc queries) | |||
Select different columns within a range | Charts and Charting in Excel | |||
How select active rows from A to D columns? | Excel Discussion (Misc queries) | |||
How can change range to select active rows instead of :=Range("S10 | Excel Discussion (Misc queries) | |||
How do you select two cells in different rows and columns with ou. | Excel Discussion (Misc queries) |