Counting Cells in Columns Depending on Content - excel

I have a column with 5 or so categories each described by a string of text. If I take a =Count function it won't count anything because they're text strings, and if I use Counta I'll only get the count for one of the five categories by highlighting that category specifically. Is there a way to, with or without filtering, create a counting function that - when dragged down - takes the whole column as input and then automatically sorts the counts by 'blocks'? Would it make more sense to do this using a VLOOKUP? Thanks!

Use COUNTIF()
for example:
=COUNTIF(A1:A100,B1) which will count the number of cells in column A containing the text in B1

Related

Count Rows with Text

I am trying to count the number of rows with text but not count the number of text. For example, in the table below there are six rows with text. If I used a Counta then it would return 11 but I want it to return the number of rows with text. In my scenario I need it to return 6. There is no specific criteria other than you're only counting each row once that has text and not counting each the number of pieces of text. Is there a way to do this?
Column 1
Column 2
Column 3
One
Three
One
Two
Three
One
Three
Two
Three
One
Two
Use:
=SUM(--(MMULT(--(A2:C7<>""),TRANSPOSE(COLUMN(A2:C7)^0))>0))
This is an array formula and depending on ones version may require the use of Ctrl-Shift-Enter instead of Enter when exiting edit mode.
If one has LET and SEQUENCE we can use LET and have only one reference to change:
=LET(rng,A2:C7,SUM(--(MMULT(--(rng<>""),SEQUENCE(COLUMNS(rng),,1,0))>0)))
What about creating a helper column, containing the concatenation of the three columns, and apply the CountA() worksheet function on that?
You can easily concatenate using the formula =A1&B1&C1, for every row.

Modify Countif rank formula so that matching results only count once

So I have this spreadsheet
I am trying to workout the most picked item out of each bin based on the style and colour, I have created a sumif formula that counts and adds all of the items that is the same colour. I am now trying to create a ranking for each item based upon the Style Color Pick QTY and the month.
=(COUNTIFS(A:A,[#[bin-name]],I:I,[#Month],K:K,">"&[#[Style Color Pick QTY]])+1)
The problem is that it ranks every individual line, so instead of PS-1 Scarlet having a rank of 7 I would like it to have a rank of 2.
I have tried adding extra conditions to this such as an extra sumif that checks the previous result, or putting them in IF statements to compare to other results but all of my attempts result all Ranks being 1 or not changing.
So I am looking to modify this formula or being able to write a =unique() formula in another sheet and run the Rank Countif formula against that, I am able to write this but not sure how how to embed the # to make the formula dynamic(i.e. So i'm not dragging the formula down 1000 lines).
Any help would be appreciated.
I found an unelegant solution to your problem. This approach might be able to be refactored into a more elegant solution though.
Column Rank is the column you already have.
Column Uniques is a helper column that has the formula =IFERROR(INDEX([Rank]; MATCH(0; INDEX(COUNTIF($B$1:B1;[Rank]); 0; 0); 0)); "") in its first cell B2.
Getting the Proper_Rank is now as easy as =RANK([#Rank];[Uniques];1).
The two helper columns Rank and Uniques can of course be hidden or placed wherever you want. As I said, it's probably possible to combine these helper columns into one calculation, but I don't know how.

Excel - How to locate and sum adjacent cells and over multiple columns based on criteria of other columns cells

Formula to add all occurrences where a name pops up in a column (multiple columns) and return the summed value of all adjacent cells. For more clarification see
Example Attached
In this circumstance I want it to find all of Jim's adding to 5, all of George adding to 4, and all of Terry adding to 7. The challenge is each column will have the names randomly assorted and some times the name may not show up for that day.
Is it possible to search all days for the month (for this example) and add the total of the adjacent column for each person if I input their name?
I was looking into SUMIF functions but I can only get that to work if its all in 2 columns, with the way this one is approached I can only work through multiple columns.
Thank you for any assistance!
Use SUMIF, You will need to provide the list of names:
=SUMIF(Y:AC,"Jim",Z:AD)
Note the offset but same size ranges. Also change "Jim" to a cell that contains the name you want to sum.

Excel: Sort column by specific names, than add the sum of the sorted items to separated cell

I have a column where I am going to add 3 specific strings ("zero","one","two").
These items will be sorted by default. I want a separated cell for the "zero" to search how many "zero" are there in the column and calculate the sum of them.
The problem is that every time when I use this document, the amount of "zero"-es will be different.
As far I understood your question is that you have a column with Multi names (Zero, One and Two) with a corresponding value cell and you want add the values of all the Zeros. Well as by this, the Sumif() function will help you good. See the picture at Following. see in the formula bar
and use Countif() to count the Zeros in the Column.

Formula to count sum of cells if first 11 characters are the same?

Please look at this screenshot below.
I'm trying to count sum of quantities for sites that have the same first 11 characters. If it's only one it has to be added to the table as well.
Would anyone recommend which formula could help me with that?
Thanks!
Add a helper column C, with the formula left(a4,11) in cell C4.
Select the whole table (all three columns) and use it as the data source for a pivot table. Put the helper column on the rows of the pivot table and the Quantity as the value.
I assume the goal here is to sum the quantities in column B, for which the first eleven characters of column A match. You could do with sumif, making use of a wildcard. Formula would be: =sumif($A$4:$A$14,"XXX-CC-VVVV"&*,$B$4:$B$14)
In this case the first eleven characters are hardcoded. If you make use of the answer by MattClarke you can refer to the cells you place that function in. "=left(a4,11)". The asterix sign * indicates a wildcard. This wildcard is any character or multitude of characters. If you want to know more about wildcards have a look at this tutorial for example: https://www.deskbright.com/excel/excel-wildcard/
If you want to know how often a certain building is mentioned in your table you can make use of the countif formula =countif($A$4:$A$14,"XXX-CC-VVVV"&*)

Resources