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!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I would use the countif function in the cell you want to display the total of each different size =COUNTIF(A1:A100,"S")
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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
Back
Top