I have a google spreadsheet that has 6 cells with specific numbers in them. Every week, a series of numbers is entered in and I would like to flag the numbers in a separate column if they appear for that week. I was using the formula below where my numbers are in D2->I2 and the weekly ones would be in D18->I18 for example.
=arrayformula(sumproduct((D2:I2=D18:I18)))
Now, while this works, it's not quite what I'm trying to do. Unless the numbers match each other exactly, 1 2 3 4 5 6 to 1 2 3 4 5 6 then the addition doesn't happen. What I would like to have happen is that if, for example, the master column has 1 2 3 4 5 6 and the weekly column has 3 7 9 1 8 5 then the cell with the formula would display the value of 3 for matching three of the numbers that week.
Does anyone have a suggestion on how best to accomplish this?
See if this works ?
=ArrayFormula(sum(--regexmatch(D2:I2&"", join("|", D18:I18&""))))
with exclusion of empty cells in both ranges:
=iferror(ArrayFormula(sum(--regexmatch(to_text(filter(D2:I2, len(D2:I2))), "\b("&join("|", to_text(filter(D18:I18, len(D18:I18))))&")\b"))))
Related
This may be beyond my skill level in Google Sheets, and it's certainly straining my brain to think through, but I have two columns out a large spreadsheet (30000 lines or so) that I need to find matches between unique values on one list, and non-unique but specific values ONLY on another list. That is, I would need the following list to return only the values on the left that had a 3 in the right column every time that value appears on the left, not just for a specific instance.
"Unique" Identifier (can repeat)
Value
1
2
2
3
3
2
4
2
5
3
6
2
1
2
2
2
3
2
4
2
5
2
6
2
I have the following formula from another couple answers mocked up, but it doesn't get me all the way there:=UNIQUE(FILTER(A2:A,B2:B>0))
How can I get it to exclude the ones that have, for instance, both a 2 and a 3 in the right column for the same value in the left column?
Edit: To put it in more real terms (I was trying to keep it abstract so I could understand the basics), I have a Catalog ID and a Condition for items, and need to find all Catalog IDs that only have Good copies, not any Very Good copies. This link should show what I want to achieve:
https://docs.google.com/spreadsheets/d/e/2PACX-1vSjenkDS2Mk3t4kTcDoJqSc8AV6ONu4Q17K1HPaIUdJkb7dhdnbAt-CzUxGO3ZoJISNpGajUtFTGz8c/pubhtml?gid=0&single=true
to return only the values on the left that had a 3 in the right column every time
try:
=UNIQUE(FILTER(A:A; B:B=3))
update 1:
=UNIQUE(FILTER(Sheet1!A:A; Sheet1!B:B="Good"))
update 2:
=UNIQUE(FILTER(Sheet1!A:A, Sheet1!B:B="Good",
NOT(COUNTIF(FILTER(Sheet1!A:A, Sheet1!B:B<>"Good"), Sheet1!A:A))))
this one seems super simple but I'm having a tough time figuring it out, any help would be greatly appreciated.
I have repeating data in Column A, in Column B I need sequential numbering unless the previous row has a repeat value, in which case it would repeat that number in the sequence. Example below.
Is this possible in a single cell array formula?
Column A Column B
7648490 1
7634199 2
7631608 3
7620465 4
7620465 4
7616976 5
7601241 6
7601241 6
7601241 6
7601241 6
7599651 7
7597439 8
7597376 9
7596068 10
7596068 10
7596068 10
7596068 10
7596068 10
7596067 10
Delete everything from Col B (including the header) and place the following formula in B1:
=ArrayFormula({"Header";IF(A2:A="",,VLOOKUP(A2:A,{UNIQUE(FILTER(A2:A,A2:A<>"")),SEQUENCE(COUNTA(UNIQUE(FILTER(A2:A,A2:A<>""))))},2,FALSE))})
This will create header text (which you can change as you like within the formula itself) and will produce the result for each row.
The virtual array formed between the curly brackets { } creates a pairing of each UNIQUE value from Col A with an incremental SEQUENCE that starts at 1. Then VLOOKUP just finds each actual value from Col A within the virtual array and returns the SEQUENCE number.
I am trying to make an overview of different sub-tasks per project, think of three columns, Project, Task-ID, Working hours. After filtering for working hours, I would want to show all task-IDs that meet the requirement, but only show the Project in the first rows of respective tasks. Is there a way to solve this problem?
I've tried conditional formatting (changing the text color to meet the background if previous Project text cell is similar to current cell), but this does not change when filtering.
All data:
Project Sub-Task Working hour
1 1-Collect 4
1-Upload 3
1-Read 6
2 2-Collect 3
2-Upload 3
2-Extract 5
3 3-Collect 6
3-Upload 7
3-Read 7
Goal (when filtered for Working hour>5):
Project Sub-Task Working hour
1 1-Read 6
2 2-Extract 5
3 3-Collect 6
3-Upload 7
3-Read 7
try:
=FILTER(A:C, C:C>5, A:A<>"")
how to find a sum of 3 higher values from the range of 6 which are on the one row e.g We have integer values A1:A6 like 2 5 7 4 9 9 It should sum 9+9+7 so 25
Is it possible by any formula or something?
Take a look at the answer Extracting the top five maximum unique values
That should provide you with a basic mechanism (QUERY), to get the top 3 values. Then, apply the SUM function to that result.
So, in your case, you would want:
=SUM(QUERY(A2:A6,"select A order by A desc limit 3",-1))
Here's another one:
=SUM(ARRAY_CONSTRAIN( SORT(A1:A6,1,0),3,1))
Shorter version:
=large(A:A,1)+large(A:A,2)+large(A:A,3)
to apply to an entire column, though A:A could be limited to A1:A6.
I've made an excel document from MS2013 (xlsx) that computes all numbers above it, because i want it to dynamically compute and adjust its own formula as i add more rows above it. But when i import this on google spreadsheets, the formula doesn't work anymore. here is the sample and formula
A B C D
1 3 3 2 2
2 4 3 4 5
3 5 6 4 3
4
5 12 12 10 10
the formula for A5 is =SUM(A1:OFFSET(A5,-1,0))
when i add 1 more row above A5 the formula adjusts accordingly to the formula's current position. What's the correct formula for google spreadsheet?
I propose you this formula (it's certainly not the better solution, nevertheless it's a solution):
=sum(indirect("A1:"&ADDRESS(ROW()-1;COLUMN())))
You can use this in your example:
=SUM(A1:A4)
If you start adding extra rows, then they will be automatically accounted for.