I'm analyzing a large dataset and trying to figure out how to best count how many cells contain a particular set of words without duplicating cells where these words appear multiple times in a single cell. For example, I'd like to count the total number of cells that contain either "blue" OR "green" but only have cells labeled as "blue green" count once.
I've tried:
=countifs(A:A,"*blue*",A:A,"green")
or
=ArrayFormula(SUM(COUNTIFS(A:A,{"*blue*","*green*"})))
but these don't address what I'm trying to accomplish.
Try
=SUMPRODUCT(REGEXMATCH(A:A, "(?i)blue|green"))
and see if that helps?
Related
i want to count the number of range on my sheet, but i want to make it without the cells that contain a specific word, for now I'm using this syntax to count in general but it's not the final results that i want
=TO_TEXT(COUNTIF(K8:K,"COMMANDE CONFIRMER")) & " Commandes confirmer"
this specific word that i want to be check on it it's on cell L
thank you in advance
You can count the cells that contain a specific word by
=COUNTIF(K8:K,"*myWord*")
and therefore subtract this value from the overall count
I'm trying to grab a subset of covid data from a cell in google sheets that contains a lot of superfluous data.
Specifically, the LDH vaccine information tab here has a tab containing "Vaccination by Gender by Parish" which has two things repeated 64 times: A line containing information on total series initiated and completed per parish, and a chart showing the percentage breakdowns by gender for that parish.
I'm importing this tab by copy/pasting into a google form (splitting it in 2 halfway through to get around the character limit). It returns a massive cell (or, two cells rather) containing 32(x2) instances of both the lines containing parish vaccine data and several lines containing the chart data.
Is there a way I'm not seeing to create an array formula that will isolate the two segments? I don't need the gender breakdown information, just the top-line numbers per parish. If I can get the top-line numbers into a separate cell together, I can use a split function on them, but can't separate everything correctly using the split function from a single cell.
This is the shortest of three lists/charts that display the information as a raw string (on the front-facing side, which I need to use because other people will be inputting this data into the sheet).
Edit: Here's a viewable version of the sheet.
To get to the correct tab, click "Vaccination Information" at the top of the ArcGIS dashboard. Then, click the left arrow at the bottom of the dashboard until it displays "Vaccination by Gender by Parish."
Since it is not possible to use automatic import using formulas and you have to use copy-paste, you can get the result you want faster this way.
Copy from the site and paste the data on the sheet.
Filter and remove unnecessary rows.
Split the text into columns using the "-" separator.
Search and replace, remove text and spaces from the data columns.
Just to preface this is quite a unique ask and I've googled a bunch of times and never seen the combination of these factors being asked before.
Essentially I have 2 sheets. 'Sheet' & 'Sheet2'
'Sheet' has
A1:3
A2:4
A3:8
A4:4
And So on with random amounts for a few hundred cells. I want 'Sheet2' to display the following and allow me to drag it to extrapolate it. The reason it is every nth cell is because those cells are merged (i.e A1-D1 is merged).
A1:('Sheet1'A1) E1:('Sheet1'A2) I1:(Sheet1'A3) M1:('Sheet1'A4)
and so on
I can extrapolate the data with =OFFSET(Sheet!$A1,COLUMN()-1,0) but it skips the missing data on cells A2 & A3 and creates A1:('Sheet1'A1) E1:('Sheet1'A4) instead.
A simple pull-across formula would be
=index(Sheet1!$A:$A,(column()+3)/4)
Or an array formula
=ArrayFormula(vlookup((column(2:2)+3)/4,{row(Sheet1!A:A),Sheet1!A:A},2))
Assuming there are enough merged cells available to hold all the data in sheet 1.
Sheet 1
Sheet 2
Google sheets problem here. I have a group of cells that I'm trying to automate into making the "ingredient list" in a nutrition facts cell for food products. I'll have in one row for example, carrots, onion, tomatoes, sugar. In the cell next to it, I'll have the corresponding percentage. What I need, is to have each item sent to a single cell so that it looks like a plain sentence. For example, if the info was carrots 22%, onions 33%, tomatoes 12%, and sugar 5%, the information would read "Ingredients: Onions, Carrots, Tomatoes, Sugar. Thank you in advance for your help. This one has been giving me a headache.
Here is a screenshot of my current sheet. As you can see, there are the two circled columns and the arrow pointing to the "ingredients" cell. I need the cells that are circled to be listed in the "ingredients" cell in order of percentage from highest to lowest, separated by commas.
Update: I have been able to figure out how the list the cells, but I can't figure out how to organize them by percentage. Here is the formula I'm currently using.
=CONCATENATE(F2,",",F3,",",F4,",",F5)
try this: =TEXTJOIN(", ", true, sort(A2:A13,B2:B13, false))
Where A2:A13 is the column for ingredients and B2:B13 is the column for Total %.
enter image description here
I have a column with various text inputs. I'd like to count the number of cells that include either "word1" or "word2". So that if a single cell contains one or more of these it counts as one.
I've managed to make a formula that I think counts all occurrences of "word1" and "word2", but I'm only after the amount of cells containing one of them (or any number of them).
What is the formula for this?
You can use an array formula:
=ARRAYFORMULA(SUMPRODUCT(((ISNUMBER(SEARCH("word1",A1:A5))+ISNUMBER(SEARCH("word2",A1:A5)))>0)*1))
That formula was based on barry houdini's answer a while ago.
Just change the range as required.