• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to LOOKUP against a range of values

sudipballa

New Member
Hello Folks,

I have two columns (From and To) and i have a set of ranges in those.

Eg: I have records of Account Ranges.

I have one more column, where i have a account number. I want to do a look up against the above two columns having the range and find out if it is present in any of those or not.

Attached is a sample file.

THanks
Sb
 

Attachments

  • Book10.xlsx
    8.6 KB · Views: 2
Azumi - Thanks a lot for the file. Will you be able to throw some light on what you tried to do inside the formula? I tried going through it, but didnt get it.
 
Hi Sb,
May be a non-array...
in H2:
=SUMPRODUCT(($A$2:$A$8<=G2)*($B$2:$B$8>=G2)*($A$2:$A$8))&" - "&SUMPRODUCT(($A$2:$A$8<=G2)*($B$2:$B$8>=G2)*($B$2:$B$8))

Copy down till H4.

Regards,
 
or with SUMIFS:

=SUMIFS($A$2:$A$8,$A$2:$A$8,"<="&G2,$B$2:$B$8,">="&G2)&" - "&SUMIFS($B$2:$B$8,$A$2:$A$8,"<="&G2,$B$2:$B$8,">="&G2)
 
Back
Top