Excel how to put data into categories with multiple requirements and a range of values for one requirement

Anonymous
2023-01-12T15:53:52+00:00

Hello, 

I need help with finding the right formula for Excel to put data into categories. The category that it needs to be in depends on two factors: household size and income. First, I need it to understand how many people are in the household (a number between 1 and 8, so an exact match), then within that category, I need it to return the income category (extremely low, very low, low or high) based on income ranges (so not an exact match, which is what I am having difficulty with). I have figured out how to reference two requirements if they are BOTH an exact match, but the income ranges will not be an exact match. I need it to reference income limits. I have made multiple tables in hopes the table structure was the problem. I have also tried putting all the income limits in ascending order but that also has not worked. I have tried using VLOOKUP, INDEX, and MATCH but none of them work for my specific case. For some reason my screenshots are not uploading no matter what I try, so I hope this can be solved without screenshots. I made a table below for some reference: 

This is the table that would need to be referenced to put the data into an income range category (ex. low, very low, low, high) 

there really isn't an upper limit for high, because anything about the limit for low is considered high. 

Household size Extremely Low Income upper limit Very Low Low High
1 15,550 25,990 41,400 300,000
2 17,750 29,600 47,300 300,000
3 21,720 33,300 53,200 300,000

Here is another table to show an example of what the data looks like, where I need a formula to generate the income category. 

Household Size Income Income Category
2 50,000
4 47,250
1 32,800

I'm sure there has to be a way for it to find a category based on one requirement that is an exact match and one requirement that has limits/ranges. Please let me know!

Microsoft 365 and Office | Excel | Other | MacOS

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
{count} votes
Answer accepted by question author
  1. Ashish Mathur 100.8K Reputation points Volunteer Moderator
    2023-01-12T23:57:34+00:00

    Hi,

    If you are Ok with transforming your first table like the one shown in the image below, then this formula will work in cell H2

    =XLOOKUP(F2&G2,$A$2:$A$33&$B$2:$B$33,$D$2:$D$33,"",-1)

    Hope this helps.

    2 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Andreas Killer 144K Reputation points Volunteer Moderator
    2023-01-12T16:34:06+00:00

    Do I just need to change the ranges to the minimum value instead of the maximum income value?

    Exactly!

    Same file.

    1 person found this answer helpful.
    0 comments No comments

9 additional answers

Sort by: Most helpful
  1. Andreas Killer 144K Reputation points Volunteer Moderator
    2023-01-12T16:07:48+00:00

    C8: =INDEX($A$1:$E$1,MATCH(B8,FILTER($A$1:$E$4,$A$1:$A$4=A8)))

    Sample file:

    https://1drv.ms/x/s!AsEpmlJLteasjlTdf0bf5ASJA8Tb?e=harIC6

    0 comments No comments
  2. Anonymous
    2023-01-12T16:18:42+00:00

    Hello! thanks for the quick reply, but it looks like the result is wrong for the first example (C8). If the household size is 2 and the income is 50,000, the household would be considered a high income category, not low. The numbers provided in the table are the upper limit that place someone in that category. Do you know how to fix that? The third example (C10) is correct though. Do I just need to change the ranges to the minimum value instead of the maximum income value?

    0 comments No comments
  3. Anonymous
    2023-01-12T16:36:26+00:00

    Great, thank you so much!!!

    0 comments No comments