I have a table contains "year" & "value" columns. (example attached)
I need to create summary table to show the maximum value within each year.
I appreciate if somebody advices with formula to use.. Thanks
I have a table contains "year" & "value" columns. (example attached)
I need to create summary table to show the maximum value within each year.
I appreciate if somebody advices with formula to use.. Thanks
Try this
In G7
Confirmed by pressing Ctrl+Shift+EnterPlease Login or Register to view this content.
Drag/Fill Down
and for Minimum
Confirmed by pressing Ctrl+Shift+EnterPlease Login or Register to view this content.
Hope this helps
Last edited by Marcol; 07-15-2010 at 01:08 PM. Reason: Added minimum as an extra
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
Have you considered using a Pivot Table ?
On an aside - re: the Array, though:
=MAX(($A$3:$A$14=$F7)*($B$3:$B$14))
will work without issue I confess I often prefer to split the conditional test from the resulting values, ie:
=MAX(IF($A$3:$A$14=$F7),$B$3:$B$14))
CSE
I think this is cleaner but also it has the added advantage of being more "flexible" should you decide latterly you wish to revert to a MIN test - ie all you need do is adjust the MAX to MIN using the above method (resetting the array).
In the first example you can not adjust to MIN in this manner as the MIN would always be 0 (unless all values met the pre-emptive condition)
(same holds true for AVERAGE also)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thanks everybody, it works!
Hi DonkeyOte
After I added the minimum "extra" to the demo workbook
Please Login or Register to view this content.
This fell in place
Please Login or Register to view this content.
Confirmed by pressing Ctrl+Shift+EnterPlease Login or Register to view this content.
Is that approach better? or are there disadvantages that I don't know of ?
I would really like to get a grip on this formula business.
I also hope that adelkam will benefit, and that I am not poaching his thread.
I have updated the demo with your formula added.
"Better" is subjective of course but IMO, yes - when conducting MIN or AVERAGE calcs the approach is invariably a necessity rather than a choice so for me it makes sense to apply the same logic to MAX even though "technically" it can be avoided.
There is one other benefit of separating test from associated values and that is you're removing the explicit coercion of associated values.
Consider A1:B5
a 1
b 2
a 3
a b
b 2
The initial MAX approach would generate an Error (#VALUE!) given the explicit coercion of B1:B5
=MAX((A1:A5="a")*B1:B5)
CSE
whereas the split approach avoids the coercion and thus does not generate an error
=MAX(IF(A1:A5="a",B1:B5))
CSE
The Nulls added to the MIN/MAX/AVERAGE Arrays aren't technically required though they do no harm and perhaps makes the formula more intuitive.
Where the conditional test fails a Boolean FALSE will be added to the resulting Array of values (by default), these Logical results will be ignored in the subsequent MIN/MAX/AVERAGE calculation.
I must be having a bad hair day...
The formula I came up with for minimum when editing Post #2 is what you were suggesting in Post #3.
Thank you for the clear explaination.
If any more pennies drop today I'll feel like a one-armed-bandit with diarrhea ...
I'm of to the pub before I've none left to spend ......... ... beer yum yum!!!
Thanks again
Alistair
Thanks a lot for your help. Now I have another question (I'm attaching the file with Problem #2 in it)
Using the same table example, I need to extract values from the original table, which are equal to or greater than a given threshold value.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks