I have column U, which should be summing only values with a unique index. So for the highlighted cell, it should only add column T if column A in the same. I can't tell what is wrong with my formula, it is pulling numbers from a different source in the workbook.
My formula:
=if(A3168<>A3169,sumif($A$2:A3168,A3168,$T$2:T3168),"")
Any help with this very much appreciated
it means the value in column A is found further up the sheet. 204 exists in earlier rows.
to truly do just the grouping put this in U2:
=IF(A2<>A3,SUM($T$2:$T2)-SUM($U$1:$U1),"")
And copy down.
Related
I have no idea how to title this post, apologize in advance.
I have several sheets with a number in Column I and a name centered and merged in columns A:H. I want to obtain the name from A:H of the corresponding value within I but do have duplicates, therefore I need the nth value when permitted. The formula I have so far works up to the point it does not autofill down as an ArrayFormula, so when I drag the formula down I get an #REF! error due to the fact that when a duplicate is found it cannot overwrite the formula below.
This will be easier to showcase: LINK TO SHEET.
Essentially, in the main sheet all the values in I:I of all the other sheets are obtained and sorted, then using that column I want to return the name that corresponds to the value, allowing for duplicates to work themselves out. I believe my issues resides in the $B1 part at the end of the formula preventing it from being an array.
=ARRAYFORMULA(UNIQUE(FILTER({Sheet2!$A$1:$A;Sheet3!$A$1:$A;Sheet4!$A$1:$A},{Sheet2!$I$1:$I;Sheet3!$I$1:$I;Sheet4!$I$1:$I}=$B1)))
Cell F2 on the Sheet1 tab:
=QUERY({Sheet2!A:I;Sheet3!A:I;Sheet4!A:I},"select Col1,Col9 where Col9>0 order by Col9 asc",0)
You can read more about query here.
Sorry for poor formatting ahead of time.
I have a Google Sheet that collects responses from a Form. What I am trying to do is take the URLs that are made from the file upload question on the form and split them into individual URLs in the same row. I had this working without issue previously and now when making a new sheet, the formula I am using is not working and giving me unexpected errors or data. Can't embed photos yet so links below.
Formula
Value Error
The formula will copy data from the reference cell if there is no comma, but if a comma is added to any cell in the column, the entire formula stops working. I am really not sure what the problem is as I said this worked just fine previously. Thanks in advance, I've been at this longer than I care to admit and I assume this is a simple problem that I have overlooked.
The reason why you encountered such issue is because you are trying to create an array with mismatched number of columns.
Based on your sample scenario, when you used ={"File1";arrayformula(iferror(split(Q2:Q,",")))} while your column Q2:Q data doesn't have a comma, arrayformula will return 1 column results. Row1 column count and the array formula result's column count matches.
But if Q2:Q data contains comma, arrayformula will return multiple column results which doesn't match in your row 1 column count
You can use this formula in cell R1:
=arrayformula(iferror(split({"File1,File2,File3,File4,File5,File6";Q2:Q},",")))
Output:
I have these two columns:
For the next columns I would to apply this formula:
SUM[all_previous_columns]
I would like to write it once for the third column and apply it for the rest of the columns.
Any idea how to do this?
You mean this?
You should use absolute addressing to first column in the range you want to sum and relative addressing to last column. Then you can drag your formula right as far as you want.
As it just doubles each time, you could also write it as an array formula:
=ArrayFormula((A1+B1)*2^(column(C1:1)-3))
I have the following COUNTIF Formula in my Google Sheet.
=COUNTIFS('Events/Incidents'!$E$3:$E,X4,'Events/Incidents'!$I$3:$I,"Accident")
This is a sample of the sheet which has the formula in the first row under the "Accidents" header:
It works until a user adds a row 3 to the top of the source sheet (Events/Incidents) then the formula changes to the following so that it captures row 4 down instead of the desired row 3.
=COUNTIFS('Events/Incidents'!$E$4:$E,X4,'Events/Incidents'!$I$4:$I,"Accident")
I used the Query function for "All Events" (the first 3 columns). The Countif formula is under each of the Incidents. In my Countif example, X4 is the Employee, John White which was returned in the QUERY.
The QUERY continues to return/include row 3 but I don't know how to do this for the individual Incidents. I tried adding ArrayFormula to the Countif function but I have the same problem.
Would appreciate some help with this.
I understand that you want to update your QUERY to reflect the correct row without resorting to returning the Branch in every response. If my comprehension is correct, there is a way to reach your goals with little modification.
First, you'll have to create a named range that includes the whole table (from the headers to the last row). You can then use this named range in every formula so new rows can be detected without changing the formula per se.
Finally, you can modify your QUERY to return only the values of Incidents in a Branch with something similar to =QUERY(myNamedRange,"SELECT G WHERE A = 'Auckland'"). That QUERY won't return the Branch, only the Incidents. If you keep having any doubts, please ask me for further help.
I worked it out by combining Countifs with ImportRange:
=COUNTIFS(IMPORTRANGE("1-f6OU8ylDSlpqdpt4P5B7GDcIel3IboVkUbY2huMA6U","Events/Incidents!$E$3:$E"),X4,IMPORTRANGE("1-f6OU8ylDSlpqdpt4P5B7GDcIel3IboVkUbY2huMA6U","Events/Incidents!$I$3:$I"),"Accident")
I'm trying to style the first instance of a value in a column. I found this custom formula through googling:
=COUNTIF($A1:$A100,$A1)=1
but this styles the last instance of the value, and I'm not sure why.
try this formula:
=COUNTIF($A$1:$A1,$A1)=1
THE COUNTIF SOLUTION:
The formula =COUNTIF($A$1:$A1,$A1)=1 as suggested by Max is a common solution to this problem. It is a variation of the formula for finding duplicates : =COUNTIF($A:$A,$A1)>1.
COUNTIF DRAWBACK:
One of the drawbacks of using the COUNTIF formula is that it relies on the first parameter $A$1:$A1 in order to accurately evaluate the conidtional-formatting correctly. The formula works the same in the conditional formatting as it would if you were to physically put the formula in B1, and the copy it down the whole column. The first copy in B1 will appear as the original formula =COUNTIF($A$1:$A1,$A1)=1but the one in B2 will appear as =COUNTIF($A$1:$A2,$A2)=1.
This can be a real problem and result in false positives or maybe the conditional formatting not working at all if you are doing any sorting, cutting and pasting, dragging and dropping rows or cells, etc.
THE MATCH SOLUTION:
An improved version of this formula that eliminates the possibility of false positives and prevents the range from automatically being updated when it has been sorted, copied, cut, dragged, dropped, etc is as follows:
=MATCH($A1,INDIRECT("$A:$A"),0)=ROW()
EXPLANATION OF MATCH SOLUTION:
The only purpose in the INDIRECT formula is to prevent the range from automatically updating. If you would prefer it to update when you copy and paste you can instead do: =MATCH($A1,$A:$A,0)=ROW() The key to this formula working properly is that the MATCH formula parameter 2 looks at the entire column, that way when it finds the exact location of parameter 1 it can compare it to the row#. If there are duplicates within column A Match will only return the location of the first instance. Since parameter 2 is the entire column the answer it returns is also the row# of the first instance. So the second part of the formula above =ROW() will compare the first instance's row# to the row# of the current cell, if they are identical than the formula will entire formula will return TRUE
ADAPT MATCH SOLUTION TO FIND DUPLICATES (after first instance):
The MATCH formula can also be adapted to find all duplicates after the first entry. (basically the inverse) by changing the last part of the formula =ROW() into <ROW() So the duplicate finding formula would be: =MATCH($A1,INDIRECT("$A:$A"),0)<ROW()