* Need serious help with formula/function *

  • Thread starter The Flea Circus
  • Start date
T

The Flea Circus

Here's an example of what I need...


Cell Value
_________________

D3 100.0000 <---------------- Random number entered



D7 37.6875

D8 75.3750
<---------------- 100.0000 falls
D9 113.0625 in between here.

D10 150.75000

D11 188.4375

D12 226.1250



D19 _________ <---------------- Target number



I need excel to recognize where the random number ( D3 ) falls on the
scale ( D7 - D12). Then, I need excel to know whether to round up, or
round down, and automatically place the value in cell D19. FYI,
numbers on the scale are in increments of 37.6875.

In the example, 100.0000 falls in between 75.3750 and 113.0625, and
should then be rounded UP because 100.0000 is more than ½ way
between 75.3750 and 113.0625. So the target number would be 113.0625.


I need a formula that will help me achieve this. Any help would be
greatly appreciated.
 
H

Harlan Grove

The Flea Circus said:
I need excel to recognize where the random number ( D3 ) falls on
the scale ( D7 - D12). Then, I need excel to know whether to round
up, or round down, and automatically place the value in cell D19.
FYI, numbers on the scale are in increments of 37.6875.
....

If your tables is really graduated by constant 37.6875 increments,

D19:
=ROUND(D3/37.6875,0)*37.6875

More generally, use the array formula

D19:
=INDEX(D7:D12,MATCH(MIN((D7:D12-D3)^2),(D7:D12-D3)^2,0))
 
T

The Flea Circus

...

If your tables is really graduated by constant 37.6875 increments,

D19:
=ROUND(D3/37.6875,0)*37.6875

More generally, use the array formula

D19:
=INDEX(D7:D12,MATCH(MIN((D7:D12-D3)^2),(D7:D12-D3)^2,0))



Thanks! The first formula worked! Second formula didn't, but who
cares?

Thanks again.
 
T

The Flea Circus

The Flea Circus said:
"Harlan Grove" <[email protected]> wrote:
...
[2nd formula]
Thanks! The first formula worked! Second formula didn't, but who
cares?

I did mention that the second formula was an array formula. Type the
formula, then hold down [Shift] and [Ctrl] keys before pressing
[Enter].


You're right. My apologies. The second formula worked great too.

thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help with If formula 6
VLookup Within a Range 2
Payment calculation 1
Help with formula 1
Stripe out duplicate data 5
Run macro on selected sheets 10
Countif() formula 3
RESET BUTTON 3

Top