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.
Related
I have the following formula:
=INDEX(TODAY!$D$2:TODAY!$D$306; MATCH(0; COUNTIF($A$2:$A2; TODAY!$D$2:TODAY!$D$306);0))
in the above example 306 is the number of ROWS in D column of the TODAY sheet that I get from the following formula:
=COUNTA(TODAY!D2:TODAY!D2000)
I can't figure out how to merge these two formulas together, so that in A column I get unique values for number of rows generated by second formula. Because if I copy the first formula along the A column it starts repeating from the beginning same values.
For example, what happens now is if I have 5 unique records in TODAY sheet but i copy the formula in 10 rows of A column it repeats those 5 records again. But I need to get only 5 records, others must remain blank.
Thank you!
One approach is to use OFFSET.
Here's a list of animals and we want to count horses and the list can grow but it's fixed on A2:A12.
To make it dynamic use OFFSET and your COUNTA formula e.g.
OFFSET(A2,0,0,COUNTA(A2:A40))
Which replaces the fixed A2:A12 range in the example.
How to reproduce cells that are in the same row a certain time? Please see the screenshot.
Use INDEX function to reference each of your text ranges as a 1D range.
Then you just need to develop two counters. The first counter will increase by 1 every 4 columns, the other will reset/loop every 4 columns. Use these counter to pull the appropriate cell address from the INDEX Function.
The following formula increases by 1 every 4 columns:
=INT((COLUMN(A:A)-1)/4)+1
The following formula loops a count of 1 to 4 as its copied to the right:
=MOD(COLUMN(A:A)-1,4)+1
Combined with with an index you can use the following formulas:
Names
=INDEX($A$1:$G$1,INT((COLUMN(A:A)-1)/4)+1)
Letters
=INDEX($A$3:$D$3,MOD(COLUMN(A:A)-1,4)+1)
Note the formula will produce an error if you pull it too far to the right as it will run out of names in the index to reference. It will work for a maximum columns Number of Names X Number of Letters, or the Maximum number of columns in your spreadsheet, which ever is smaller.
If you have Excel O365 with dynamic arrays and the SEQUENCE function, you can use these formulas in a single cell.
The results will SPILL over the requisite number of Cells, and adjust if you change the data ranges.
I used Dynamic named ranges for the two rows of information you have, but you could use Tables, or other methods:
A7: =INDEX(myMonths,1,INT(SEQUENCE(,COLUMNS(myData)*COLUMNS(myMonths),1,1/COLUMNS(myData))))
A8: =INDEX(myData,1,MOD(-1+SEQUENCE(,COLUMNS(myData)*COLUMNS(myMonths)),COLUMNS(myData))+1)
I thought a bit and figured out a simple solution as shown in the screenshot.please see the formula here
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.
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.
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