Excel macro

P

perci

Hi!

I have one problem. Since I don't know Visual Basic to make a macro
hope anyone can help me.

I have instrument which collect data and send it to the Excel file
This are on-line data. What I want to do is to collect 10 samples (i
it's possible to choose how many, this would be better) in a desire
time (time interval is not fixed but defined by user). After collectio
of all samples I want to calculate average of every sample and write i
to another spreadsheet as result.

Pleas, hel
 
G

Gerrit van Stempvoort

Hi,

The best way is to record a macro (Tools, Macro, Record New Macro) and just
do manualy what the macro should do later.
Then you can edit the macro usinfg these tips:

Define the number of samples is quiet easy, use an input boxlike this

Dim NrOffSamples as Integer

NrOffSamples = Inputbox ("Enter the number of samples:", "NrOffSamples")
On the same way you can set an time interval.
 
Top