How to categorize data based on values in Excel?
Supposing, you need to categorize a list of data based on values, such as, if data is greater than 90, it will be categorized as High, if is greater than 60 and less than 90, it will be categorized as Medium, if is less than 60, categorized as Low as following screenshot shown. How could you solve this task in Excel?
Combine / import multiple worksheets or csv files into one worksheet or workbook:
In your daily work, to combine multiple worksheets, workbooks and csv files into one single worksheet or workbook may be a huge and headachy work. But, if you have Kutools for Excel, with its powerful utility – Combine, you can quickly combine multiple worksheets, workbooks or csv files into one worksheet or workbook.
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!
To apply the following formula to categorize the data by value as you need, please do as this:
Enter this formula: =IF(A2>90,"High",IF(A2>60,"Medium","Low")) into a blank cell where you want to output the result, and then drag the fill handle down to the cells to fill the formula, and the data has been categorized as following screenshot shown:
If there are multiple grades need to be categorized as below screenshot shown, the If function may be troublesome and difficult to use. In this case, the Vlookup function can do you a favor. Please do as follows:
Enter this formula: =VLOOKUP(A2,$F$1:$G$6,2,1) into a blank cell, and then drag the fill handle down to the cells you need to get the result, and all data has been categorized at once, see screenshot:
Note: In the above formula, B2 is the cell that you want to get the categorized grade, F1:G6 is the table range you want to look for, the number 2 indicates the lookup table column number which contains the values you want to return.