I have the following data
***********************
Sheet 1
4/10/2013 1 97.254 97.401 97.113 97.132 6454.07
4/10/2013 2 97.131 97.25 97.03 97.215 5501.74
4/10/2013 3 97.216 97.3 97.097 97.221 4413.97
4/10/2013 4 97.222 97.309 97.122 97.277 3802.76
4/10/2013 5 97.276 97.294 97.142 97.262 3534.71
4/10/2013 6 97.262 97.267 97.05 97.101 3788.87
4/10/2013 7 97.101 97.173 96.952 97.117 6334.11
4/10/2013 8 97.118 97.169 96.985 97.08 5989.99
4/10/2013 9 97.083 97.238 97.073 97.174 4283.57
4/10/2013 10 97.173 97.201 97.08 97.104 3565.61
4/10/2013 11 97.105 97.195 97.086 97.191 3476.76
4/10/2013 12 97.191 97.236 97.156 97.194 2709.11
4/10/2013 13 97.194 97.206 97.072 97.159 4298.25
4/10/2013 14 97.159 97.167 96.985 97.101 6580.02
4/10/2013 15 97.107 97.282 97.1 97.125 6683.83
4/10/2013 16 97.126 97.216 97.037 97.205 5126.46
4/10/2013 17 97.204 97.454 97.163 97.355 5219.53
4/10/2013 18 97.353 97.48 97.315 97.397 2885.45
****************************************************
In sheet 2 I am seeking the following data
4/10/2013 6 97.254 97.309 97.03 97.101 27496.12
4/10/2013 12 97.101 97.238 97.952 97.194 26359.15
4/10/2013 18 97.194 97.48 97.037 97.397 30793.54
where column 3 is the value from 6th previous row in sheet 1
column 4 is the maximum from previous 6 rows in sheet 1
column 5 is the minimum from 6 previous rows in sheet 1
column 6 is value from row in sheet 1 with same date and time value
column 7 is sum of 6 previous rows in sheet 1
***********************************
Possible formulae
column 3 formula could be =INDEX(Sheet1!C:C,ROWS($A$1:$A6950)*6 - IF(MOD(COLUMN(C$1),6=3, 10, 6))
note 6950 is just the current row number
column 6 formula could be =INDEX(Sheet1!C:C,ROWS($A$1:$A6950)*6 - IF(MOD(COLUMN(C$1),6=3, 9, 5))
Both of these seem to give me what I want
I would appreciate any pointers for similar formulae to generate columns 4, 5 and 7 results
Many thanks
Bob M
Bookmarks