ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   need help for several issues (https://www.excelbanter.com/excel-programming/325352-need-help-several-issues.html)

bandy2000

need help for several issues
 
Hi all,
I'm new to VBA though I did already some VB programming. I need to create a
macro as quick as possible to get data analyzed that i produced recently. One
set of data consists of 88 tab delimited ASCII files. There is always a small
header of about 25 columns (but not necessarily exactly 25) then there are
four columns of data. It is pretty much data. One file is about 3MB and
contains almost 60.000 rows.

first question:
is it possible to load data from the 88 files into one new file and there
into 88 worksheets?

I tried already to open all 88 files as single files but my PC ran out of
resources.
will that be the same for worksheets instead of files? How could it be done
with one file at a time? (load the file, do the calculations, save the
results in the results worksheet, close the file, open the next file in the
folder)

second question:
how can I select the files? is it possible just to give the path of a folder
and process all files that are in there? How do I do this in VBA? The 88
files are always in a separate folder for each and every test run performed.

third question:
depending to some data in the header (which is again not necessarily always
in the same row but always in the column next to a certain text entry) the
standard deviation of a set of numbers (number has to be derived from the
header too) has to be calculated several times.
How can I find entries and then select the column next to the entry?
How can I read in data from the header of the file to the macro and
calculate e.g. the number of calculations that need to be done?

fourth question:
I want to place the results of e.g. the standard deviations into a new
results worksheet. How can I do this?


This are the most urgent problem i have at the moment. I know that this is
only a newsgroup and that nobody will write the complete macro for me. But if
you have any hints tips or code sections to any of the problems postet I
would be very happy to get them as it is really urgent for me!

Thanks very much
ANDY

JohnR[_4_]

need help for several issues
 

"bandy2000" wrote in message
...
Hi all,
I'm new to VBA though I did already some VB programming. I need to create
a
macro as quick as possible to get data analyzed that i produced recently.
One
set of data consists of 88 tab delimited ASCII files. There is always a
small
header of about 25 columns (but not necessarily exactly 25) then there are
four columns of data. It is pretty much data. One file is about 3MB and
contains almost 60.000 rows.

first question:
is it possible to load data from the 88 files into one new file and there
into 88 worksheets?

Try using the filesystemobject to make one big file with some kind of
identifier between files

I tried already to open all 88 files as single files but my PC ran out of
resources.
will that be the same for worksheets instead of files? How could it be
done
with one file at a time? (load the file, do the calculations, save the
results in the results worksheet, close the file, open the next file in
the
folder)

The filesystemobject would be ideal for this See MSDN.Microsoft.com for help
second question:
how can I select the files? is it possible just to give the path of a
folder
and process all files that are in there? How do I do this in VBA? The 88
files are always in a separate folder for each and every test run
performed.

The filesystemobject would be ideal for this also See MSDN.Microsoft.com for
help
third question:
depending to some data in the header (which is again not necessarily
always
in the same row but always in the column next to a certain text entry) the
standard deviation of a set of numbers (number has to be derived from the
header too) has to be calculated several times.
How can I find entries and then select the column next to the entry?
How can I read in data from the header of the file to the macro and
calculate e.g. the number of calculations that need to be done?

Search MSDN.Microsoft.com for Instr function. It tells you how to find a
string
fourth question:
I want to place the results of e.g. the standard deviations into a new
results worksheet. How can I do this?

When you start, add a new workbook with code and keep pasting the standard
deviations using a counter to remember the next row number.

This are the most urgent problem i have at the moment. I know that this is
only a newsgroup and that nobody will write the complete macro for me. But
if
you have any hints tips or code sections to any of the problems postet I
would be very happy to get them as it is really urgent for me!

Thanks very much
ANDY




bandy2000

need help for several issues
 
Hi john,
thanks for your input. Is it possible to get a bit more detailed information
with maybe some sample code?

"JohnR" wrote:


"bandy2000" wrote in message
...
Hi all,
I'm new to VBA though I did already some VB programming. I need to create
a
macro as quick as possible to get data analyzed that i produced recently.
One
set of data consists of 88 tab delimited ASCII files. There is always a
small
header of about 25 columns (but not necessarily exactly 25) then there are
four columns of data. It is pretty much data. One file is about 3MB and
contains almost 60.000 rows.

first question:
is it possible to load data from the 88 files into one new file and there
into 88 worksheets?

Try using the filesystemobject to make one big file with some kind of
identifier between files

I tried already to open all 88 files as single files but my PC ran out of
resources.
will that be the same for worksheets instead of files? How could it be
done
with one file at a time? (load the file, do the calculations, save the
results in the results worksheet, close the file, open the next file in
the
folder)

The filesystemobject would be ideal for this See MSDN.Microsoft.com for help
second question:
how can I select the files? is it possible just to give the path of a
folder
and process all files that are in there? How do I do this in VBA? The 88
files are always in a separate folder for each and every test run
performed.

The filesystemobject would be ideal for this also See MSDN.Microsoft.com for
help
third question:
depending to some data in the header (which is again not necessarily
always
in the same row but always in the column next to a certain text entry) the
standard deviation of a set of numbers (number has to be derived from the
header too) has to be calculated several times.
How can I find entries and then select the column next to the entry?
How can I read in data from the header of the file to the macro and
calculate e.g. the number of calculations that need to be done?

Search MSDN.Microsoft.com for Instr function. It tells you how to find a
string
fourth question:
I want to place the results of e.g. the standard deviations into a new
results worksheet. How can I do this?

When you start, add a new workbook with code and keep pasting the standard
deviations using a counter to remember the next row number.

This are the most urgent problem i have at the moment. I know that this is
only a newsgroup and that nobody will write the complete macro for me. But
if
you have any hints tips or code sections to any of the problems postet I
would be very happy to get them as it is really urgent for me!

Thanks very much
ANDY






All times are GMT +1. The time now is 10:36 PM.

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