View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
GMB_Excel
 
Posts: n/a
Default I'm sure there is a way...


Hello everyone!

This is my first visit here and I hope to get an answer on something I
am trying to get done in Excel. A look through other posts have also
made me realise how much more can be done in Excel than I ever
thought...

Here's my situation: I am a physiologist collecting data from an
ultrasound machine on the diameter of blood vessels. When my experiment
is finished I end up with a file that has four columns and up to 23,000
rows. The important columns are the first two and they are a time
column (format: hh:mm:ss), and a diameter column. The frequency of
measurements is such that for every second you end up with 25 rows, but
unfortunately, sometimes you end up with 24 rows in a second. What I
need to do is to get average diameters for every second and for every
ten seconds.

What I have done so far is to use "if" statements to give all the rows
within a second a marker (so that "10:25:01" is "1", "10:25:02" is "2",
etc.), and then average the diameters for each of these markers (using
more "if" statements to add the diameters within a marker and divide by
the "count" of the marker). Having done this I end up with a column
where I get the average diameters I need, but with 24 blank cells in
between. That's where the problems begin.

Problem 1: I get an error message saying that a 2D plot can only
contain up to 16,000 points for each series. This is despite filtering
the column with the results to only display the "nonblanks" which are a
lot less than 16,000.

Problem 2: When I average the one-second intervals to get ten-second
intervals, and then try to filter this column to only disply
"nonblanks" my averages are messed up because the source column has
changed as well.

My questions:

1. Is there any way to average for every so many rows? If yes, is there
a way to quickly have an automatic check to see if every second has 25
rows to it? If I cannot is there a way I can work around the
possibility of having a few seconds that will contain a different
number of rows?

2. When you have a column with blank cells, is it possible to copy it
and then paste only the nonblank cells? (this could prevent the error
message I get and which pauses my macro).

I appreciate this is a long, and possibly unclear explanation so I will
not be too surprised if you ignore me, but thanks in advance anyway.

All the very best,
George


--
GMB_Excel
------------------------------------------------------------------------
GMB_Excel's Profile: http://www.excelforum.com/member.php...o&userid=32141
View this thread: http://www.excelforum.com/showthread...hreadid=518979