Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Find Min and Max in variable length arrays

I have a spreadsheet of 1,247,000 rows displaying prices (Date,
Time,Open,High,Low,Close). I would like to find the lowest Low and the
highest High in various daily time slots (like 937am thru 1017am) to then
test against buying above the highest High and selling below the lowest Low
in the time range selected. I can use Min and Max in fixed array periods but
I stumble badly when I try to make the formula dynamic enough to accept many
different time brackets.
Any help would be greatly appreciated.
Thanks!
Dave LeVeck
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Find Min and Max in variable length arrays

Assuming you have numerics in ColD..(high)..the below array formula will
return the MAX() based on the conditions...Replace the
startdate/time,enddate/time with cell references..Please note that this is an
array formula. You create array formulas in the same way that you create
other formulas, except you press CTRL+SHIFT+ENTER to enter the formula. If
successful in 'Formula Bar' you can notice the curly braces at both ends like
"{=<formula}"

=MAX(IF((A2:A10=startdate)*(A2:A10<=endDate)*
(B2:B10=starttime)*(B2:B10<=endTime),D2:D10))

Replace MAX() with MIN() for the minimum..

--
Jacob (MVP - Excel)


"Dave" wrote:

I have a spreadsheet of 1,247,000 rows displaying prices (Date,
Time,Open,High,Low,Close). I would like to find the lowest Low and the
highest High in various daily time slots (like 937am thru 1017am) to then
test against buying above the highest High and selling below the lowest Low
in the time range selected. I can use Min and Max in fixed array periods but
I stumble badly when I try to make the formula dynamic enough to accept many
different time brackets.
Any help would be greatly appreciated.
Thanks!
Dave LeVeck

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Max length of variable name? David Excel Programming 7 April 13th 10 03:35 AM
SUM for columns of variable length excelhack Excel Programming 2 May 2nd 07 04:35 PM
Return a Variable value length Sean Excel Worksheet Functions 5 December 4th 06 09:25 PM
Find/Copy Variable length range [email protected] Excel Programming 0 March 6th 06 07:50 PM
Sum a column of variable length? Brian Excel Discussion (Misc queries) 5 February 3rd 05 02:26 PM


All times are GMT +1. The time now is 08:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"