Hello,
I would be grateful if anyone could help me with a macro please.
I have
Column A: showing time in seconds (Consecutive) dd/mm/yyyy hh:mm:ss
format (As it is overnight data it could run in to thousands
of rows)
Column B: showing a number between 0 & 100 corresponding to the time
(Oxygen percentage picked up by a machine)
Column C: shows the heart rate
Column D: random time points (not consecutive) in the above format when
a leg movement occured as recorded by another device, rows
variable depending on the number of movements
I need a macro that would match each time point time in column D with the time in Column A, and select the preceding 20 seconds(20 rows) of Column B & Column C data to create a chart.
If I give the background it might make it easy to understand what I need.
We plan to run a study that looks at limb movements during sleep. A device records the movements and gives a log of time points.
However some movements are artefactual caused by reduction in oxygen levels as recorded by another machine. This device produces second by second oxygen levels through the night.
I need to exclude a movement from analysis if it was due to low oxygen levels preceding a movement. Hence I need to match the time point from leg device with the time in the oxygen device and look at all the oxygen levels 20 seconds before the movement on a graph. As the log from the leg device can have upto 200 or 300 time points I need a macro that produces multiple charts or a single chart with the above requirement for me to have a look at them.
I would sincerely appreaciate any help with this.
I would be grateful if anyone could help me with a macro please.
I have
Column A: showing time in seconds (Consecutive) dd/mm/yyyy hh:mm:ss
format (As it is overnight data it could run in to thousands
of rows)
Column B: showing a number between 0 & 100 corresponding to the time
(Oxygen percentage picked up by a machine)
Column C: shows the heart rate
Column D: random time points (not consecutive) in the above format when
a leg movement occured as recorded by another device, rows
variable depending on the number of movements
I need a macro that would match each time point time in column D with the time in Column A, and select the preceding 20 seconds(20 rows) of Column B & Column C data to create a chart.
If I give the background it might make it easy to understand what I need.
We plan to run a study that looks at limb movements during sleep. A device records the movements and gives a log of time points.
However some movements are artefactual caused by reduction in oxygen levels as recorded by another machine. This device produces second by second oxygen levels through the night.
I need to exclude a movement from analysis if it was due to low oxygen levels preceding a movement. Hence I need to match the time point from leg device with the time in the oxygen device and look at all the oxygen levels 20 seconds before the movement on a graph. As the log from the leg device can have upto 200 or 300 time points I need a macro that produces multiple charts or a single chart with the above requirement for me to have a look at them.
I would sincerely appreaciate any help with this.