-
-
If you sort column A ascending,
=LOOKUP(E1, $A$1:$A$4000, $A$1:$A$4000) will return the number below the value given.
=LOOKUP(E1, $A$1:$A$4000, $A$2:$A$4001) will return the number above the value given
=LOOKUP(E1,$A$1:$A$4000, $B$1:$B$4000)
=LOOKUP(E1,$A$1:$A$4000, $B$2:$B$4001)
Will return the matching values from column B.
I think this formula will do what you want
=IF((LOOKUP(E1,$A$1:$A$4000, $A$2:$A$4001)-E1)<(E1-LOOKUP(E1,$A$1:$A$4000,$A$1:$A$4000)), LOOKUP(E1,$A$1:$A$4000, $B$2:$B$4001), LOOKUP(E1,$A$1:$A$4000, $B$1:$B$4000))
-
Thank you very much, works very good.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules