Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Macro or VBA process varible row data

I get text files for work that I need to pull into excel and heavily
manipulate. Since the steps are fairly consistent I would like to set
something up to do this for me. The biggest problem I am having is that the
original text file can vary drastically in size from a few hundred lines to
over 50,000 and since it IS government supplied data it tends to have a lot
of holes.


I usually start by copying the text and pasting it into excel.
The text is sent by various government sources and contains one record per
line.

What I need to do then is to select the just copied text, and paste it to a
new worksheet, label the worksheet and then run "text to columns" to delimit
the text via fixed width.

Then I need to add 5 rows of header data (which is constant across the
board) and
add a column in the middle of the data to show the difference between two
dates (ie Cell 1 €“ Cell 2)

Now here's the hard part, I then need to add find the first 2 completely
blank rows and highlight them yellow and add a =sum and an =count function
both on the new column with the difference in dates.

=sum(entire data set)
=count(entire data set)


Please help!
Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro or VBA process varible row data

I think you may be taking the wrong approach. It may be better to use in the
data menu Import Data rather than using text to columns. When you import the
data or copy the data to the new sheet, simply put the data in row 6 rather
than inserting 5 blank rows. Finally, to find the first two blank rows it is
better to start at the last row of the worksheet and look for the 1st row of
data.

LastRow = cells(rows.count,"A").end(xlup).Row

Rows.count = 65636
xlup searchs from 65536 to the last row of data.

From you description it isn't clear what two columns you are comparing and
where are the dates you are comparing.


I would start with a learn Macro (Tools Menu - Macro - Record New Macro).
Perform the steps you need and then post on website so adjustments can be
made.

"Surrealdogma" wrote:

I get text files for work that I need to pull into excel and heavily
manipulate. Since the steps are fairly consistent I would like to set
something up to do this for me. The biggest problem I am having is that the
original text file can vary drastically in size from a few hundred lines to
over 50,000 and since it IS government supplied data it tends to have a lot
of holes.


I usually start by copying the text and pasting it into excel.
The text is sent by various government sources and contains one record per
line.

What I need to do then is to select the just copied text, and paste it to a
new worksheet, label the worksheet and then run "text to columns" to delimit
the text via fixed width.

Then I need to add 5 rows of header data (which is constant across the
board) and
add a column in the middle of the data to show the difference between two
dates (ie Cell 1 €“ Cell 2)

Now here's the hard part, I then need to add find the first 2 completely
blank rows and highlight them yellow and add a =sum and an =count function
both on the new column with the difference in dates.

=sum(entire data set)
=count(entire data set)


Please help!
Thank you!

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
Macro that sums cells in rows of varible number and.... blazzzercat Excel Programming 2 December 28th 06 10:32 PM
how do i set up repeating titles with varible data Knowonder New Users to Excel 1 January 16th 06 06:21 AM
Macro Required - to process data Pele Excel Programming 6 October 18th 05 04:57 PM
How to count process running time ( process not finished) miao jie Excel Programming 0 January 13th 05 09:23 AM
How to count process running time ( process not finished) miao jie Excel Programming 2 January 12th 05 06:01 AM


All times are GMT +1. The time now is 06:53 AM.

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

About Us

"It's about Microsoft Excel"