Macro to create multiple charts

Shankar08

New Member
Joined
Jun 25, 2011
Messages
5
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.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,224,566
Messages
6,179,551
Members
452,927
Latest member
rows and columns

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top