If Statement with Text as a range of Values and Numbers needed as Output

Xifajk

New Member
Joined
Apr 23, 2013
Messages
1
Hey guys and girls,

I found this website via Google trying to solve a problem I'm trying to solve with Excel 2010, so I decided to make an account and post my problem here as it seems a friendly community. I have the following list (showing part of it):

NameT-Shirt Sizes
NathanS
RachelleXL
AntonXL
GraziellaXS
ChristineS

<colgroup><col><col><col></colgroup><tbody>
</tbody>

The aim of the list is to see what Sizes each and every person needs and then count how many T-Shirts are required for that particular size. The list is over a 100 entries long so counting it manually isn't really an option as it's time consuming as well as errors might arise.

Thus, I've been trying to use the IF statement with the following logic but to as no avail

IF Size in Column is XS
Add 1 to a particular Cell
IF Size in Colum is S
Add 1 to a particular Different Cell

and so on for the other sizes...kind of like a counter for a for-do-loop.

Any help is appreciated, especially if I'm using the wrong function!

Thanks and regards!
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Pcool

Board Regular
Joined
Nov 28, 2011
Messages
68
I would use the countif function in the cell you want to display the total of each different size =COUNTIF(A1:A100,"S")
 

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
4,391
Office Version
  1. 365
Platform
  1. MacOS
Column A has all the names
Column B has all the sizes people have ordered

assume starting at row2

put all the possible sizes into a new column say D

so D2 down - has

S
M
L
XL
XXL
XXXL
and any other possible size

Now in column E2 next to the Size put

i have assumes list is to row 1000
=COUNTIF($B$2:$B$1000,D2)
and copy down for all rows with the unique sizes in
 

Watch MrExcel Video

Forum statistics

Threads
1,122,371
Messages
5,595,782
Members
414,020
Latest member
Meghdad

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top