Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cam Cam is offline
external usenet poster
 
Posts: 165
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Cam Cam is offline
external usenet poster
 
Posts: 165
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default Select range of rows/Columns?

Turn on the macro recorder, then record your steps.

--
Regards,
Bill Renaud



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I cant select rows or columns cp402 Excel Discussion (Misc queries) 0 April 6th 10 08:17 PM
Select different columns within a range Kiran Charts and Charting in Excel 0 March 8th 10 01:22 PM
How select active rows from A to D columns? ldiaz Excel Discussion (Misc queries) 2 October 2nd 08 04:36 PM
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
How do you select two cells in different rows and columns with ou. M.G Excel Discussion (Misc queries) 3 December 17th 04 11:39 PM


All times are GMT +1. The time now is 03:45 PM.

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

About Us

"It's about Microsoft Excel"