#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default Min Max Question

My data looks like this (there is actually 5k rows of data)

Stock Price
AA 1
AA 2
AA 3
AA 4
BB 1
BB 2
BB 3


I am looking for a formula that will produce this table:

Stock Low High
AA 1 4
BB 1 3

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Min Max Question

"carl" wrote:
I am looking for a formula that will produce this table:

Stock Low High
AA 1 4
BB 1 3


Assuming you enter the names of the stocks starting in A2 of a summary
worksheet and your data is in a worksheet called Data starting in A2, enter
the following array formulas[*] starting in B2 and C2 of the summary
worksheet and copy down:

B2: =MIN(IF(Data!$A$2:$A$5000=A2,Data!$B$2:$B$5000))
C2: =MAX(IF(Data!$A$2:$A$5000=A2,Data!$B$2:$B$5000))

Note: In XL2007 and later, you might be able to use the unbounded ranges
Data!$A:$A and Data!$B:$B. I'm not sure.
[*] Enter an array formula by pressing ctrl+shift+Enter instead of Enter.
Excel will display an array formula surrounded by curly braces in the
Formula Bar, i.e. {=formula}. You cannot type the curly braces yourself.
If you make a mistake, select the cell, press F2 and edit, then press
ctrl+shift+Enter.


----- original message -----

"carl" wrote in message
...
My data looks like this (there is actually 5k rows of data)

Stock Price
AA 1
AA 2
AA 3
AA 4
BB 1
BB 2
BB 3


I am looking for a formula that will produce this table:

Stock Low High
AA 1 4
BB 1 3

Thank you in advance.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,522
Default Min Max Question

On Nov 2, 11:15*am, "joeu2004" wrote:
"carl" wrote:
I am looking for a formula that will produce this table:


Stock Low High
AA 1 4
BB 1 3


Assuming you enter the names of the stocks starting in A2 of a summary
worksheet and your data is in a worksheet called Data starting in A2, enter
the following array formulas[*] starting in B2 and C2 of the summary
worksheet and copy down:

B2: *=MIN(IF(Data!$A$2:$A$5000=A2,Data!$B$2:$B$5000))
C2: *=MAX(IF(Data!$A$2:$A$5000=A2,Data!$B$2:$B$5000))

Note: *In XL2007 and later, you might be able to use the unbounded ranges
Data!$A:$A and Data!$B:$B. *I'm not sure.

[*] Enter an array formula by pressing ctrl+shift+Enter instead of Enter.
Excel will display an array formula surrounded by curly braces in the
Formula Bar, i.e. {=formula}. *You cannot type the curly braces yourself.
If you make a mistake, select the cell, press F2 and edit, then press
ctrl+shift+Enter.

----- original message -----

"carl" wrote in message

...







My data looks like this (there is actually 5k rows of data)


Stock Price
AA 1
AA 2
AA 3
AA 4
BB 1
BB 2
BB 3


I am looking for a formula that will produce this table:


Stock Low High
AA 1 4
BB 1 3


Thank you in advance.


Modify this to suit. Not necessary to CSE
=SUMPRODUCT(MAX(($A$2:$A$8=A2)*($B$2:$B$8)))
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default Min Max Question

On Nov 2, 2:29*pm, Don Guillett wrote:
On Nov 2, 11:15*am, "joeu2004" wrote:





"carl" wrote:
I am looking for a formula that will produce this table:


Stock Low High
AA 1 4
BB 1 3


Assuming you enter the names of the stocks starting in A2 of a summary
worksheet and your data is in a worksheet called Data starting in A2, enter
the following array formulas[*] starting in B2 and C2 of the summary
worksheet and copy down:


B2: *=MIN(IF(Data!$A$2:$A$5000=A2,Data!$B$2:$B$5000))
C2: *=MAX(IF(Data!$A$2:$A$5000=A2,Data!$B$2:$B$5000))


Note: *In XL2007 and later, you might be able to use the unbounded ranges
Data!$A:$A and Data!$B:$B. *I'm not sure.


[*] Enter an array formula by pressing ctrl+shift+Enter instead of Enter.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Min Max Question

Hello,

I suggest to use my UDF Pstat:
http://sulprobil.com/html/pstat.html

Regards,
Bernd
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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
SUM Question lanrcdd Excel Discussion (Misc queries) 3 November 8th 06 01:27 AM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM


All times are GMT +1. The time now is 07:04 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"