Re: Find the first lowest value in a column that exceeds $foo



On Sat, 21 Mar 2009 17:54:50 -0700 (PDT), 2008@xxxxxxxxx wrote:

I've got a column with a list of ordered values like this:

Code:

100000000
50000000
33333333
25000000
20000000
16666667
14285714
12500000
11111111
10000000
9090909
8333333
7692308
7142857
6666667
6250000
5882353
5555556
5263158
5000000
4761905
4545455
4347826
4166667

And a user enters a value, which could be anything up to the highest
value in this column. I need a method of finding the lowest number in
the column that is larger than the user entered value.

for example, if the user entered 4500000, then the value I'd need
would be 4545455.

Any ideas on how I can accomplish this?

**Note: you'll notice that this list of numbers has a pattern. It is 1/
N*100000000

IF your list of values is in A1:A24; and your user entered value is in D1,
then:

=INDEX($A$1:$A$24,MATCH(D1,$A$1:$A$24,-1))

Or, without a list of values, merely:

=SUMPRODUCT(1/MATCH(D1,1/ROW(INDIRECT("1:24"))*100000000,-1)*100000000)

If you want to solve arithmetically, I believe the following will do that:

=1/FLOOR(1/D1*100000000,1)*100000000

You may need to round or adjust your display to get rid of any unwanted
decimals.
--ron
.



Relevant Pages

  • Re: PINLED Displays
    ... Under normal operation the display ... to add "32 adjustablbe resistors" One for each LED per segment. ... it is sooooo wrong to adjust the full set of displays by using ... You do not use the same supply voltage for both logic and display's. ...
    (rec.games.pinball)
  • Re: Number Of Decimal Digits In Frequency Display
    ... >> Is the signle digit in the decimal poriton of the frequency display, ... newsagents in the city used to stock the South/West and London ... he hasn't seem more than one place of decimals. ...
    (alt.radio.digital)
  • Re: PINLED Displays
    ... Under normal operation the display ... to add "32 adjustablbe resistors" One for each LED per segment. ... it is sooooo wrong to adjust the full set of displays by using ... You do not use the same supply voltage for both logic and display's. ...
    (rec.games.pinball)
  • Re: Pigeon Guided Missles
    ... location of the pecks on the screen to steer the bomb. ... But then all you'd have is a pigeon that can aim -- using its own visual ... They had no computers at all to display an image. ... could not be dropped accurately enough to adjust for wind effects and the ...
    (comp.ai.philosophy)
  • Re: Displaying Currency on a VB . NET windows form
    ... time format specifiers. ... form of string to be displayed. ... Isn't there a property that just can be set on how to display the Money, ... any decimals. ...
    (microsoft.public.dotnet.general)

Quantcast