Selecting Every 6th Row In A Column

M

mcyates

I have bough a watch which records my heart beat every 5 seconds but
want on the graph the heart beat value every 30 seconds (every 6 row
(5 x 6 = 30 seconds) how would i go about doing this?

Thanks in advanc
 
D

Don Guillett

One way is to hide( with a macro) view and then unhide.
or
set your series to something like this where you just used ctrl key to
select each.

=SERIES(,,(Sheet1!$A$1,Sheet1!$A$3,Sheet1!$A$5,Sheet1!$A$7,Sheet1!$A$9),1)
 
D

Don Guillett

This might be useful

Sub ShowEverySixthRow()
Cells.EntireRow.Hidden = False
lastrow = Cells(Rows.Count, "a").End(xlUp).Row
Range("a2:a" & lastrow).EntireRow.Hidden = True
For Each c In Range("a2:a" & lastrow)
If c Mod 6 = 0 Then c.EntireRow.Hidden = False
Next
Range("a1").Select
End Sub

Sub showallrows()
Cells.EntireRow.Hidden = False
End Sub

--
Don Guillett
SalesAid Software
(e-mail address removed)
Don Guillett said:
One way is to hide( with a macro) view and then unhide.
or
set your series to something like this where you just used ctrl key to
select each.

=SERIES(,,(Sheet1!$A$1,Sheet1!$A$3,Sheet1!$A$5,Sheet1!$A$7,Sheet1!$A$9),1)
 
B

Bernard Liengme

Don has one solution; here are others
a) If a4:a(whatever) have times 5,10,15,20, and B4:B(whatever) has heartrate
value then in C4 enter
=IF(MOD(B4,30)=0,B4,NA()); copy don the column; Select A and C columns (use
CTRL to select non-contiguous ranges) and make chart

b) if there is no column of times, just a column of heartrate value in
A4:A(whatever), in B4 use =IF(MOD(ROW(A4)+1,5)=0,A4,NA()) copy down column
and make chart. Adjust the +1 value if you data begins in row other than 4 -
experiment

Variation - use average values
case (a) above; in C7 type =IF(MOD(A7,30)=0,AVERAGE(A2:A7),NA()); copy down
and make chart

OK, enough sitting down; I'm going for a walk now. Here, Fido, Walkie time!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top