Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Showing Top 30 with array-formula?

Hello there;

I have a list with values from A1:A2000 from which Iwould like to
retrieve the Top 30 (largest values) in B1:B20?

I think I have seen it done by a nice array-formula the otherday, but
I cannot recreate, nor find it...
Can someone help me out?

Jen

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Showing Top 30 with array-formula?

I have a list with values from A1:A2000 from which Iwould like to
retrieve the Top 30 (largest values) in B1:B20?

I think I have seen it done by a nice array-formula the otherday, but
I cannot recreate, nor find it...
Can someone help me out?


Not sure about an array-formula, but if you put this in B1...

=LARGE($A$1:$A$2000,ROW(B1))

and copy it down through B30, it should do what you asked for.

Rick
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Showing Top 30 with array-formula?

Hi Rick,
Thanks for you solution. It works good but ...

It's that I just would like to see it performed with 1 formula ... and
enjoying the advantage that you cannot change an array-formula accidentally
by deleting a cell.

Jen

"Rick Rothstein (MVP - VB)" wrote in
message ...
I have a list with values from A1:A2000 from which Iwould like to
retrieve the Top 30 (largest values) in B1:B20?

I think I have seen it done by a nice array-formula the otherday, but
I cannot recreate, nor find it...
Can someone help me out?


Not sure about an array-formula, but if you put this in B1...

=LARGE($A$1:$A$2000,ROW(B1))

and copy it down through B30, it should do what you asked for.

Rick



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Showing Top 30 with array-formula?

jen,

You can't have a formula in (say) B1; array or otherwise, that outputs a
value to another cell. You can either go with the solutions you have in both
of your threads or resort to VB which is a bit sledghammer walnutish for what
you are trying to achieve.

Mike

"Jen" wrote:

Hi Rick,
Thanks for you solution. It works good but ...

It's that I just would like to see it performed with 1 formula ... and
enjoying the advantage that you cannot change an array-formula accidentally
by deleting a cell.

Jen

"Rick Rothstein (MVP - VB)" wrote in
message ...
I have a list with values from A1:A2000 from which Iwould like to
retrieve the Top 30 (largest values) in B1:B20?

I think I have seen it done by a nice array-formula the otherday, but
I cannot recreate, nor find it...
Can someone help me out?


Not sure about an array-formula, but if you put this in B1...

=LARGE($A$1:$A$2000,ROW(B1))

and copy it down through B30, it should do what you asked for.

Rick




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Showing Top 30 with array-formula?

Oops sorry for the double posting ...
I re-posted because I could not find my origial Q. Sorry for that.
Jen

I like the Sub-stantial walnut crushing sledgehammer ;)

On Jun 30, 10:44 am, Mike H wrote:
jen,

You can't have a formula in (say) B1; array or otherwise, that outputs a
value to another cell. You can either go with the solutions you have in both
of your threads or resort to VB which is a bit sledghammer walnutish for what
you are trying to achieve.

Mike



"Jen" wrote:
Hi Rick,
Thanks for you solution. It works good but ...


It's that I just would like to see it performed with 1 formula ... and
enjoying the advantage that you cannot change an array-formula accidentally
by deleting a cell.


Jen


"Rick Rothstein (MVP - VB)" wrote in
. ..
I have a list with values from A1:A2000 from which Iwould like to
retrieve the Top 30 (largest values) in B1:B20?


I think I have seen it done by a nice array-formula the otherday, but
I cannot recreate, nor find it...
Can someone help me out?


Not sure about an array-formula, but if you put this in B1...


=LARGE($A$1:$A$2000,ROW(B1))


and copy it down through B30, it should do what you asked for.


Rick- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Showing Top 30 with array-formula?

Jen,

Thought I'd do a VB solution anyway. This 'borrows' cell f1 to do the
calculations. Ive done it that way because VB doesn't include the 'Large'
function.

Sub stantial_effort_minimal_problem()
For x = 1 To 20
Range("F1").Select
ActiveCell.FormulaR1C1 = "=LARGE(RC[-5]:R[1999]C[-5]," & x & ")"
Cells(x, 2).Value = ActiveCell.Value
Next
End Sub

Mike

"Jen" wrote:

Hi Rick,
Thanks for you solution. It works good but ...

It's that I just would like to see it performed with 1 formula ... and
enjoying the advantage that you cannot change an array-formula accidentally
by deleting a cell.

Jen

"Rick Rothstein (MVP - VB)" wrote in
message ...
I have a list with values from A1:A2000 from which Iwould like to
retrieve the Top 30 (largest values) in B1:B20?

I think I have seen it done by a nice array-formula the otherday, but
I cannot recreate, nor find it...
Can someone help me out?


Not sure about an array-formula, but if you put this in B1...

=LARGE($A$1:$A$2000,ROW(B1))

and copy it down through B30, it should do what you asked for.

Rick




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Showing Top 30 with array-formula?

Hello Jen,

Array enter into B1:B30:

=LARGE(A1:A2000,ROW(A1:A30))

Of course can also write ROW(1:30) but the formula would recalc if any
value in row 1:30 would change. This way it only depends on A1:A2000.

Regards,
Bernd

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Showing Top 30 with array-formula?

Hi Bernd,
This was xctly the elegant array-formula I was after, thx a lot!!
Jen

On Jun 30, 12:43 pm, Bernd P wrote:
Hello Jen,

Array enter into B1:B30:

=LARGE(A1:A2000,ROW(A1:A30))

Of course can also write ROW(1:30) but the formula would recalc if any
value in row 1:30 would change. This way it only depends on A1:A2000.

Regards,
Bernd



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Showing Top 30 with array-formula?

Array enter into B1:B30:

=LARGE(A1:A2000,ROW(A1:A30))

Of course can also write ROW(1:30) but the formula would recalc if any
value in row 1:30 would change. This way it only depends on A1:A2000.


I just got up for the morning, so I may still be a little groggy, but I
don't get that formula to work correctly. I array-entered it in B1 and then
copied it down to B30 and it does not give me the results my formula does
(and the differences are skipped, high numbers in your formula). If I change
the A1:A2000 range to the absolute one $A$1:$A$2000 in your formula, then it
produces the same results as my formula (no skipped high numbers); but then
I don't understand what the array-entry is doing for us with regard to that
second argument. What am I missing here (either in the way I entered the
formula or in my understanding of what the array-entry method is doing)?

Rick

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Showing Top 30 with array-formula?

On Sat, 30 Jun 2007 10:30:24 -0400, "Rick Rothstein \(MVP - VB\)"
wrote:

Array enter into B1:B30:

=LARGE(A1:A2000,ROW(A1:A30))

Of course can also write ROW(1:30) but the formula would recalc if any
value in row 1:30 would change. This way it only depends on A1:A2000.


I just got up for the morning, so I may still be a little groggy, but I
don't get that formula to work correctly. I array-entered it in B1 and then
copied it down to B30 and it does not give me the results my formula does
(and the differences are skipped, high numbers in your formula). If I change
the A1:A2000 range to the absolute one $A$1:$A$2000 in your formula, then it
produces the same results as my formula (no skipped high numbers); but then
I don't understand what the array-entry is doing for us with regard to that
second argument. What am I missing here (either in the way I entered the
formula or in my understanding of what the array-entry method is doing)?

Rick


Rick,

You need to array-enter it into *all* the cells, not just B1.

One way:

1. Select B1:B30
2. Enter formula into function bar (retaining the B1:B30 selection).
3. <ctrl<shift<enter

If you did it correctly, the identical "braced" formula will be in all the
cells, and the results should be as described.
--ron


  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Showing Top 30 with array-formula?

You need to array-enter it into *all* the cells, not just B1.

One way:

1. Select B1:B30
2. Enter formula into function bar (retaining the B1:B30 selection).
3. <ctrl<shift<enter

If you did it correctly, the identical "braced" formula will be in all the
cells, and the results should be as described.


Thanks... I have not worked with array entered formulas too much yet, so I
missed that "little" piece of the puzzle.

Okay, in order to help my array-entered-formula learning experience, what
benefit does this method have over the one I posted? I mean, each method
requires something to be filled into each cell in B1:B30, and the two fill
processes are roughly equivalent to implement, so what is it about the
array-enter method that Jen finds so attractive?

Rick

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Showing Top 30 with array-formula?

Hello Rick,

Some beginner cannot easily change the formula by just entering some
wrong value into B1 or B2 or ...

You have to know that you need to select B1:B30 before you either
delete or array-enter something different formula.

So the array formula is "naively" safer. I actually prefer to unlock
the cells a user may change and then to protect the worksheet to
prevent the user to change any formulas.

Your approach is not slower. In fact FastExcel says that both
approaches are almost equally fast.

Regards,
Bernd

  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Showing Top 30 with array-formula?

On Sat, 30 Jun 2007 13:45:48 -0400, "Rick Rothstein \(MVP - VB\)"
wrote:

You need to array-enter it into *all* the cells, not just B1.

One way:

1. Select B1:B30
2. Enter formula into function bar (retaining the B1:B30 selection).
3. <ctrl<shift<enter

If you did it correctly, the identical "braced" formula will be in all the
cells, and the results should be as described.


Thanks... I have not worked with array entered formulas too much yet, so I
missed that "little" piece of the puzzle.

Okay, in order to help my array-entered-formula learning experience, what
benefit does this method have over the one I posted? I mean, each method
requires something to be filled into each cell in B1:B30, and the two fill
processes are roughly equivalent to implement, so what is it about the
array-enter method that Jen finds so attractive?

Rick



If I recall what Jen posted correctly, try messing things up by, for example,
just deleting the formula in B10. You'll find you can't do it; and that
appealed to him.

What I, personally, find aggravating, is that you can't edit the formula
without selecting the entire array -- but that may be a plus to some.
--ron
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
FORMULA SHOWING AS #### AVRIL Excel Worksheet Functions 6 February 4th 09 09:46 PM
FORMULA NOT SHOWING VALUE Nenagh Excel Discussion (Misc queries) 1 May 28th 07 01:01 AM
Formula Showing Zero instead of nothing Abode Excel Discussion (Misc queries) 3 May 10th 06 10:07 PM
Sum Formula Showing Instead of Value :( Carla Excel Discussion (Misc queries) 3 November 22nd 05 08:06 PM
Showing/ not showing "getting started" when excel starts Ask Excel Discussion (Misc queries) 1 July 20th 05 04:20 PM


All times are GMT +1. The time now is 07:30 PM.

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

About Us

"It's about Microsoft Excel"