Grouping

How to randomly assign people to groups in Excel

To randomly assign people to groups or teams of a specific size, you can use a helper column with a value generated by the RAND function, together with a formula based on the RANK and ROUNDUP functions. Formula =ROUNDUP(RANK(A1,randoms)/size,0) Explanation In the example shown, the formula in D5 is: =ROUNDUP(RANK(C5,randoms)/size,0) which returns a group number… read more »

How to randomly assign data to groups in Excel

To randomly people (or anything) to groups you can use the RANDBETWEEN function with the CHOOSE function. Formula =CHOOSE(RANDBETWEEN(1,3),”Group A”,”Group B”,”Group B”) Explanation In the example shown, the formula in F3 is: =CHOOSE(RANDBETWEEN(1,3),”A”,”B”,”C”) When copied down the column, this formula will generate a random group (A, B, or C) for each person in the list…. read more »

Running count group by n size in Excel

This tutorial shows how to Running count group by n size in Excel using the example below; Formula =CEILING(COUNTA(expanding_range)/size,1) > Explanation To creating a running count of groups of a variable size, you can use the COUNTA and CEILING function. In the example shown, C5 contains this formula: =CEILING(COUNTA($B$5:B5)/size,1) where “size” is the named range F4. How… read more »

Group times into unequal buckets in Excel

This tutorial shows how to Group times into unequal buckets in Excel using the example below; Formula =VLOOKUP(time,bucket_table,column,TRUE) Explanation This formula is a great example of how you can use VLOOKUP to group data in completely custom ways. If you need to group times into buckets, but the buckets are not equal (i.e. 12 AM-7… read more »

Map text to numbers in Excel

This tutorial shows how to Map text to numbers in Excel using the example below; Formula =VLOOKUP(text,lookup_table,2,0) Explanation To map or translate text inputs to arbitrary numeric values, you can use the VLOOKUP function with a simple table. In the example, we need to map five text values (statuses) to numeric status codes as follows:… read more »

If cell contains one of many things in Excel

This tutorial shows how to calculate If cell contains one of many things in Excel using the example below; Formula {=INDEX(results,MATCH(TRUE,ISNUMBER(SEARCH(things,A1)),0))} Explanation To test a cell for one of several things, and return a custom result for the first match found, you can use an INDEX / MATCH formula based on the SEARCH function. In the example… read more »

Map inputs to arbitrary values in Excel

This tutorial shows how to Map inputs to arbitrary values in Excel using the example below; Formula =VLOOKUP(input,map_table,column,0) If you need to map or translate inputs to arbitrary values, you can use the VLOOKUP function. In the example, we need to map the numbers 1-6 as follows: Input Output 1 10 2 81 3 17… read more »

Group times into 3 hour buckets in Excel

This tutorial shows how to Group times into 3 hour buckets in Excel using the example below; Formula =FLOOR(time,”3:00″) Explanation If you need to group times into buckets (i.e. group by 2 hours, group by 3 hours, etc.) you can do so with a rounding function called FLOOR. In the example shown, we have a… read more »

Group numbers at uneven intervals in Excel

This tutorial shows how to Group numbers at uneven intervals in Excel using the example below; Formula =LOOKUP(value,intervals,groups) Explanation To group numbers into intervals of unequal size, you can use the LOOKUP function. In the example shown, the LOOKUP function is used to group people by age into at intervals of unequal size. The formula… read more »

Group numbers with VLOOKUP in Excel

This tutorial shows how to Group numbers with VLOOKUP in Excel using the example below; Formula =VLOOKUP(value,group_table,column,TRUE) Explanation If you need to group by number, you can use the VLOOKUP function with a custom grouping table. This allows you to make completely custom or arbitrary groups. In the example shown, the formula in F7 is: =VLOOKUP(D5,age_table,2,TRUE) How… read more »

Sidebar