Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Conrad Evans   on Jan 19 In MS Office Category.

  
Question Answered By: Aiko Suzuki   on Jan 19

When C6 contains the value 64, and you a looking for 64; use:

C6=OFFSET(D1, COUNTIF(D1: D44,"<" & VALUE(C5)) ,0)

When C6 contains the value 64, and you a looking for 69.75; use:

C6=OFFSET(D1, COUNTIF(D1: D44,"<=" & VALUE(C5)) ,0)

This is making the assumption your LookUpList IS in ascending order as you
present in your example.

One observation: When C5 contains 3, it is less than the smallest value in your
LookUpList. I would add additional logic to advise your number  in C5 does not
'enter' the LookUpList. I'll assign this value as zero "0".
The logic expression looks like:
IsC5InTheLookUpList?=COUNTIF(D1:D44,"<=" & VALUE(C5))>0
This returns "True" when the CountIf( ) expression is greater than zero.
This returns "False" when the CountIf( ) expression is <= to zero.
A "True" result indicates there is a value C5 can be compared against in the
LookUpList. A "False" result indicates you are below the LookUpList smallest
value. Does that make sense? If so, make a change to the 'corrected' expression
from above:

C6=(OFFSET(D1, COUNTIF(D1: D44,"<" & VALUE(C5)) ,0)) * (IsC5InTheLookUpList?)

for a final expression:

C6=(OFFSET(D1, COUNTIF(D1: D44,"<" & VALUE(C5)) ,0)) * (COUNTIF(D1:D44,"<=" &
VALUE(C5))>0)

Share: 

 

This Question has 10 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on If nesting limits Or get search suggestion and latest updates.


Tagged: