How to categorize classify numbers from different ranges using Excel

0 votes

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:

enter image description here

Oct 28, 2022 in Others by Kithuzzz
• 38,000 points
3,559 views

1 answer to this question.

0 votes

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.

We'll adapt your illustration of the laws slightly:

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)
answered Oct 28, 2022 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
1 answer

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

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

answered Feb 16, 2022 in Others by Edureka
• 13,690 points
14,047 views
0 votes
1 answer

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

answered Jan 5, 2023 in Others by narikkadan
• 63,600 points
1,896 views
0 votes
1 answer

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

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

answered Feb 10, 2022 in Others by gaurav
• 23,260 points
7,972 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,690 points
1,086 views
0 votes
1 answer
0 votes
1 answer

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

answered Sep 30, 2022 in Others by narikkadan
• 63,600 points
1,005 views
0 votes
1 answer

Convert three letter country codes to full country names

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

answered Oct 16, 2022 in Others by narikkadan
• 63,600 points
1,100 views
0 votes
1 answer

Using VLOOKUP()

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

answered Nov 5, 2022 in Others by narikkadan
• 63,600 points
531 views
0 votes
1 answer

Excel: How to merge two columns into one (from different sheets or separated columns)

This equation is completely adjustable. Your two ...READ MORE

answered Oct 7, 2022 in Others by narikkadan
• 63,600 points
881 views
0 votes
1 answer

How to get columns from Excel files using Apache POI?

The only way to see all the ...READ MORE

answered Oct 18, 2022 in Others by narikkadan
• 63,600 points
5,300 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP