Share via

Return Value Based on a Range & Constant

Anonymous
2015-08-03T19:34:08+00:00

I would appreciate your assistance.

I need to return a value based on 2 criteria - one of which looks at a range.

So, for example, Bob is in the role for 8 months and has opened up 40 new accounts. His rating should be a 3 (row 4, column D). Jane is in the role 10 months and opened up 40 new accounts. Her rating is only a 2 (row 13, column D).

How can I do this? I know how to do a simple vlookup if I wanted to use just the number of months in the role. I know how to do a lookup based on 2 criteria. I also know the formula to do a vlookup based on a range. But, I can't figure out how to combine them into one.

This scale changes every year, so I don't want to list 8-1, 8-2, 8-3 all the way to 900. I actually have the whole year set-up that once I determine the full year scale, the rest of the scale adjusts automatically.

Thank you!

Cathy

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2015-08-04T13:25:16+00:00

Hi Vijay,

IMO you better write your formula as:

=IFERROR(SUMPRODUCT((('KPI Ratings'!$A$2:$A$100=F2)/(F2<>""))*('KPI Ratings'!$B$2:$B$100<=G2)*('KPI Ratings'!$C$2:$C$100>=G2)*('KPI Ratings'!$D$2:$D$100)),"")

Was this answer helpful?

0 comments No comments

Answer accepted by question author

Vijay A. Verma 104.9K Reputation points Volunteer Moderator
2015-08-04T13:05:46+00:00

If your first table is in sheet1, put following formula and drag down -

=SUMPRODUCT((Sheet1!$A$2:$A$1000=F53)*(Sheet1!$B$2:$B$1000<=I53)*(Sheet1!$C$2:$C$1000>=I53)*(Sheet1!$D$2:$D$1000))

Was this answer helpful?

0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Vijay A. Verma 104.9K Reputation points Volunteer Moderator
    2015-08-04T09:41:53+00:00

    Let's assume that value of 8 (role duration) in F2 and G2 has 40 (number of new accounts). You can use following formula -

    =SUMPRODUCT((A2:A20=F2)*(B2:B20<=G2)*(C2:C20>=G2)*(D2:D20))

    Was this answer helpful?

    0 comments No comments
  2. Ashish Mathur 101.9K Reputation points Volunteer Moderator
    2015-08-03T23:10:11+00:00

    Hi,

    I am not clear with your question.  Please clarify your inputs and expected result.  Also, there is no column showing Names in your screenshot.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-08-03T20:15:47+00:00

    I'm not sure I quite understand.

    I think what you are asking to do is 

    First Lookup the months as one lookup then

    Next Lookup the number of new accounts 

    And come up with the KPI rating from those two individual lookup results?

    Also, I see 2 columns of New Account values - which are we supposed to be looking at (B or C) to find the value in the lookup of new accounts.

    By the way - check your post for accuracy:  you say Jane has been in her role for 10 months and has 40 (???) new accounts?  Should that be 20 or 44?

    Personally, at this point I'm thinking that in the long run the easiest thing to do is create that huge table you're dreading on setting up and use either a SUMIFS() or older SUMPRODUCT() formula to pull data from it.

    It might help if you can show us the 'scale' chart you mention and explain how that works.  Best might be if you can upload a sample file to a file sharing site or to your OneDrive and share it and provide a link to it in a posting here.

    Was this answer helpful?

    0 comments No comments