Can a sorted array be produced from a table without using code? The attached sample gives a better idea of what I'm trying to do.
Thanks
Can a sorted array be produced from a table without using code? The attached sample gives a better idea of what I'm trying to do.
Thanks
Last edited by Newbie - again!; 12-12-2009 at 07:34 PM.
Like so...change the categories to a numerical index, then grab the "first" values of each number into the "Desired Outcome" chart.
E5: =IF(AND($B5=$E$3,$C5=E$4),N(E4)+1,N(E4))
...copied down and over onoe column.
G5: =IF(AND($B5=$G$3,$C5=G$4),N(G4)+1,N(G4))
...copied down and over onoe column.
J5: =IF(MAX(E:E)<ROWS($1:1), "", INDEX($A:$A, MATCH(ROWS($1:1), E:E, 0)))
...copied across and down the whole chart.
Last edited by JBeaucaire; 12-12-2009 at 06:40 PM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Brilliant. Skip the title 'Rocket Scientist" and go for "Steely-eyed Missle Man" (refer to Apollo13 for further explanation).
How does the 'n' function work?
And thanks.
You can't add 1 to a text value. I want to use a single formula for the whole column and add 1 to the index from the value above if the row matches the criteria, but this won't work in the first row because the values above the first row are text strings ("tackle" and "block").
In this usage, n(E4) means "give me the numeric value of E4"...which is 0. By using this format, I can write the formula in E5 and just copy down.
Thanks for that - it all makes sense now.
As a matter of interest, is there a formula which would sort the output data A-Z if the source data was not in alphabetical order?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks