Search : in
By :

Sort a column by data

Last answer on Jun 29, 2009 1:45:32 pm BST jon, on Jun 27, 2009 10:48:55 pm BST 
 Report this message to moderators

Hello,

I had a EXCEL spreadsheet of data for a camp I staff. Over 400 campers. I have a column for t-shirt sizes. I want a formula that tells me how many of each size are in that column. I gave you an example below. I have other columns like this that I need a forumla. I thought if you could give me the formula on this one, I can duplicate.

I want to answer the ? marks below.

T-SHIRT SIZE:
S
M
M
S
L
XL
XL

Total S = ? (should be 2 smalls)
Total M=? ( should be 2 mediums)
Total L = ? (should be 1 large)
Total XL = ? (should be 2 x-large)

Configuration: Windows XP Internet Explorer 7.0

Best answers for « sort a column by data » in :
[Excel] Sorting rows only Show[Excel] Sorting rows only Microsoft Excel by default perform a sort on the columns (Data/Sort). To sort the data horizontally, just select the data to be sorted, then Data tab /Sort/ Options/ check the Sort Left to right box in the...
Adding data from one column using another ShowAdding data from one column using another Issue Solution Note Issue I am having a real problem with an Excel formula. I have a worksheet with variable rows and a number of columns. I need to add together the values of particular...
Transforming columns into lines ShowTransforming columns into lines Example Limitations It is endemic for most Linux tools to work with lines, but not with columns (sed, awk, grep, etc..). However, it may happens,that you have a file where the data should be read in...
Base64 encoding ShowBase64 encoding The concept of Base64 encoding entails using US-ASCII (non-accented) characters to encode any sort of data in 8-bit form. Email protocols were originally designed to send messages in plain text only. But as email systems vary...
Data transmission - Cabling ShowCabling types Several physical data-transmission media are available to connect together the various devices on a network. One possibility is to use cables. There are many types of cables, but the most common are: Coaxial cable Double twisted...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...

1

msxlguru, on Jun 28, 2009 2:02:46 am BST

Use the countif function. For example, if column A contains the t-shirts sizes your formula would be as follows:

=countif(A:A,"s")

The formula above would be for a small t-shirt. You would duplicate the formula for all of the other sizes.

Reply to msxlguru

2

 jon, on Jun 29, 2009 1:45:32 pm BST

Thank you. This is what I came up with. Here is an example for my XL shirts: =COUNTIF(F2:F400,"=XL"). I repeated this formula for all sizes.

One other question: (probably another countif function)

I need to capture how many people will be in each class, specifically my 7th and 8th boys and my 7th and 8th girls. These are the 2 classes that are not co-ed. They are gender classes therefore I have to create a formula that combines 2 columns.

I have two columns. One for GENDER and one for GRADE. I have the formula for the 9th grade-Adult. These are co-ed so gender is irrelevant.

The one that is boggling me is when I need to combine 2 columns and count "how many 7th and 8th grade males I have and how many 7th and 8th females I have.

What I am trying to find is the following question marks:

TOTAL STUDENTS BY GRADE:
7/8 Females ?
7/8 Males ?
9 4
10 4
11 0
12 1
College 0
Adults 3

Column C Column D
Gender Grade
M Adult
F Adult
F Adult
F 12
F 10
F 9
F 7
M 10
M 9
M 10
M 10
M 9
M 9

Can you help me on this? Maybe copy and paste this into excel and give me the equation. I am stumped! You are my guru-hero. Let me know if you need further info.

jon

Reply to jon