Reputation: 5456
I got this calculated incremental column
10
12
14
20
25
I have a input value let say: 15
Now, because 15 is exceding 14 in this case the output value that I want is 14.
How do achieve this in Excel formula? Excel is not really my think so if you could guide me that will be good.
Thanks
Upvotes: 0
Views: 71
Reputation: 1141
Try =SMALL($A$2:$A$6,COUNTIF($A$2:$A$6,"<="&C2)) where your values (10 12 14...) are stored in A2:A6 and C2 contains 15. works for me
Upvotes: 1
Reputation: 10679
Most of what you need can be done using a VLOOKUP
formula. You haven't defined what should happen with an input value smaller than the first value in your list (e.g. an input value of 8). VLOOKUP will return the #N/A
error value for that which may/may not be the behaviour you need.
Anyway, assuming that:
the formula you need would be
=VLOOKUP(C1,A1:A5,1,TRUE)
The input value and list to search are obvious. The 1
specifies to return a value from the 1st column (obvious as you only have one column) and TRUE
specifies that you want to return the largest value that is less than or equal to the input value (FALSE
would specify an exact match only, TRUE
is the default and could thus be omitted)
There's more info about VLOOKUP
on the Microsoft Office site here
Upvotes: 0