I want to categorize numbers from [0:15] into 5 classes: A, B, C, D, E, and F.

Rules:

```0-1: Class A
2-4: Class B
5-7: Class C
8-10: Class D
11-13: Class E
14-15: Class F
```

Explanation: if the number is in the range [0:1] then it will be classified as A; if a number is in [2:4] class is B, and so on.

Sample output:

Oct 28, 2022 in Others 2,896 views

## 1 answer to this question.

I wouldn't advise utilizing nested IFs because they are tough to manage and I generally disagree with that approach on moral reasons. I would advise utilizing an INDEX(MATCH structure or a VLOOKUP.

```Min |  Class
--------------
0   |  Class A
2   |  Class B
5   |  Class C
8   |  Class D
11  |  Class E
14  |  Class F
```

Now, assuming your Max values are in sheet 2, column A, we'll use the following formula in the Class column of your output:

`=VLOOKUP(\$A2,Sheet2!\$A\$1:\$B\$7,2,TRUE)`
• 63,420 points

## How to convert data from txt files to Excel files using python

Hi , there are few steps to ...READ MORE

## How to remove borders from cells in a range in Excel using VB.net?

range.Borders(Excel.XlBordersIndex.xlEdgeLeft).LineStyle = Excel.XlLineStyle.xlLineStyleNone range.Borders(Excel.XlBordersIndex.xlEdgeRight).LineStyle = Excel.XlLineStyle.xlLineStyleNone range.Borders(Excel.XlBordersIndex.xlEdgeTop).LineStyle = Excel.XlLineStyle.xlLineStyleNone range.Borders(Excel.XlBordersIndex.xlEdgeBottom).LineStyle ...READ MORE

## How to import data from a HTML table on a website to excel?

Hello  To import any HTML file in excel there ...READ MORE

## How to use Excel VLOOKUP function with words that begin with the letters AB

If you lookup "AB" in Excel, it ...READ MORE

## Using Excel VLOOKUP() function across two sheets

The syntax for VLOOKUP is VLOOKUP(Lookup_Value,Table Array,Col_index_num,Range_lookup) OR, to start in ...READ MORE

## Convert three letter country codes to full country names

Just create a list to be used in ...READ MORE

## Using VLOOKUP()

Vlookup takes the lookup value first, so ...READ MORE