I have code that will remove a row when a box is checked but I need to ignore the first row of column headers - checkbox

I have the following code that moves a row to another tab in my sheet but I need the code to ignore the first row with the column headers. Right now If I put a column header in field A1, it moves that row to the archive sheet as well. I have tried changing the 1 to a 2 in the getRange but still does it. Any help?
I continue to have problems posting the code. Not sure what is wrong.

Related

How do you automatically copy a formula across a row if the header contains text?

I have a Google Sheet that transposes a list of items as the headers of the sheet. This list changes frequently +/- which means that the number of column headers (row 2) change frequently. On the first row (under the header) I have a formula that populates the column contents based on the header name. How do I get my formula to only copy to ALL the columns that have a header name and not to the ones that are empty.
Note the empty columns need to be there.
try:
=ARRAYFORMULA(IF(2:2="",,TRANSPOSE(MMULT(TRANSPOSE(IF(A3:3500<>"", 1, 0)),
ROW(3:3500)^0))&" Results"))

Link two cells in google sheets with autofill

First of all I would like to thank you for your time.
I have a google data studio report that extracts data from a google sheet. The data studio sheet gets values from a google form (in the form of another tab in the sheet). Altough the cells are linked, right now I have to drag the cells in the data studio sheet to pull the values from the forms sheet. If there are no values it can´t pull anything and I would like to have real time values in the google data studio as soon as a form is filled.
Right now all I have is a simple (='Form '!C55) to pull. What I would like to do is if there is a new value in the following cell in the forms sheets then the following cell in the data studio sheets pulls it so it can go to the report in dat studio.
Cheers to all!
Try this formula, in column A, after your last row of good data. So perhaps in Dados!A91. Note you will need to first delete everything in all of the cells below and to the right of A91, since this formula is filling everything:
=QUERY('Formulário '!A9:O;"select A,G,D,J,M,H,E,K,N,I,F,L,O where B <> '' ";0)
This queries your Formulário sheet, and pulls all of the data starting in row 9 (since that is what you were showing with your formula before), and selects all of the correct columns in order.
Please test it out with a test form submission, to see that it works as expected, and that it is copying the correct columns, in the right order. Let me know of any questions or issues.
I'm not positive how sheet updates work when there is no active user logged into the sheet, but I suppose when Data Studio goes to pull from Dados, it will first ensure that it has the latest data from all formulas.
Update
To have the Max and Min values,which you say should be the same all the way down the column, add a formula like the following in the header row (row 1) of your Formulario sheet:
={"Cloro Max.";ArrayFormula(IF(LEN(A2:A);1,5;""))}
That gives a value of 1,5 for a column labelled Cloro Max. Be sure to delete anything from row 2 down, in that same column, or the array formula gives a #REF error, since it can't put data when there is already data entered in those lower cells.
You can change the text to create a Max or Min column for each value you want, in columns Q to V. Change the 1,5 to whatever number you want, such as 0,5 for Cloro Min.
It will always add the value(s) to each new row as it gets added from a submitted form response.

How to pass addresses to Vlookup based on cell values (Google Sheets)

This has me stumped, so I'm hoping somebody who knows the proper functions can help me out.
I am trying to do a VLOOKUP, but I want to pass the Range in based on values in columns.
The Range is on a different sheet than where the formula is, and I want the range's start column to be determined by looking for the value that is at the top of the column the forumla exists in.
For example, in the attached image, the 'Dashboard' sheet has Column A as Sheet, and the top Row has Widgets and Sprockets in the top row.
I want the Formula to be a Lookup for the search key 'Total, and return the value in the cell next to it. I want the Range to start on the sheet specified in Column A, and the Column to be the one with the value that matches the one at the top of the column where the formula is.
So my formula will look like
=VLOOKUP("Total",<INSERT RANGE HERE>,2)
Help would be appreciated.
Link to the Google Sheet:
https://docs.google.com/spreadsheets/d/1H5At3gHeTQUm6PWqeA7MT5xcm5RJ38NK6LyhSWUeaZY/edit?usp=sharing
Thanks Stack Overflow Community
I believe this is what you're looking for.
On the Dashboard sheet enter these formulas:
C3:
=vlookup("Total", indirect($A3&"!C1:D"),2)
D3:
=vlookup("Total", indirect($A3&"!C1:F"),4)
You can then select C3:D3 and drag down to autofill. I tried using an arrayformula and it didn't work, but I might have been doing it wrong
Also make sure to change "Position1" and "Position2" to match the sheet names exactly.
Edit: I just saw your screenshot. These formulas can also be put into C2 and D2, I just put them next to the sheet names to keep track of what I had to do.
Edit in response to comment:
This was the closest I could get to what you're looking for.
C3:
=vlookup("Total", indirect($A3&"!C1:"&ADDRESS(ROW(INDIRECT($A3&"!$C50")),COLUMN()+1)),2)
D3:
=vlookup("Total", indirect($A3&"!E1:"&ADDRESS(ROW(INDIRECT($A3&"!$E50")),COLUMN()+1)),2)
Again, these columns can be dragged and autofilled down with no issues.
I have the following formula that can be pasted onto the dashboard C3 cell, and then copied across: =address(1,match(C$1,indirect($A3&"!1:1"),0),,,$A3) This will give me the address I want from the Sheet I am trying to reference, i.e. Position01!$C$1 Also, If I use the following formula, I get the value I want as a result: =offset(Position01!$C$1,7,1,1,1) However, If I try to combine the two, I get the error 'Argument must be a range'. =offset(address(1,match(C$1,indirect($A3&"!1:1"),0),,,$A3),7,1,1,1)
You need to add INDIRECT in front of the first formula when placing it inside of the OFFSET one so that it reads the result address as a range instead of a string:
=offset(INDIRECT(address(1,match(C$1,indirect($A3&"!1:1"),0),,,$A3)),7,1,1,1)
use:
=INDEX({VLOOKUP("Total", Position01!C:F, {2, 4}, 0);
VLOOKUP("Total", Position02!C:F, {2, 4}, 0)})
update:
if your project consists of 24 rows but unknown number of columns then you can use range:
Position01!C1:24 (instead of Position01!C:F)
then to return every column you can do:
COLUMN(Position01!C1:1)-1 (instead of {2, 4})
or if you want to return every 2nd column:
FILTER(COLUMN(Position01!C1:1)-2, MOD(COLUMN(Position01!C1:1), 2)=0)
(instead of {2, 4})

Continue to increment formula by N rows across columns in Google Sheets

I am trying to use UNIQUE= to grab unique values in a section of 11 rows from an XML parse. Every column I want to target the next set of rows down the column but I'm not sure how to do this automatically, dragging the formula (auto-fill) doesn't work.
Here is a link to my sheet with the UNIQUE formulas I have so far. You can see they increase by 11 each time. How can I continue that pattern without creating a new formula each time.
=UNIQUE($A2:$A13)
=UNIQUE($A14:$A25)
=UNIQUE($A26:$A37)
Here is my Google Sheet so far.
https://docs.google.com/spreadsheets/d/1y1cGi0Qy6a6PiQtQUrb5FQ99V31c_tEGi4aLvktxShE/edit?usp=sharing
Any help would be greatly appreciated!
paste in B2 and drag to the right:
=UNIQUE(INDIRECT("A"&2+(COLUMN()-2)*11+COLUMN()-2&":A"&13+(COLUMN()-2)*11+COLUMN()-2))
It looks to me like the whole thing can be done in one formula. Try creating a sheet from scratch and putting this in cell A2...
=ARRAYFORMULA(HLOOKUP("X",{"X";IMPORTXML("https://www67.myfantasyleague.com/2020/export?TYPE=schedule&L=14002&APIKEY=&W=1&F=&JSON=0","//matchup/franchise/#id")},SEQUENCE(1,14,0,12)+SEQUENCE(12)+1))

How can I keep references to changing spreadsheet constant?

I have 2 columns in a sheet that are referencing another dynamic sheet which has new rows added at the top all the time.
I want column A to be a copy of column A in Sheet1, so this works to put in cell A1:
={Sheet1!A:A}
However, I want column B to a formula applied to every row in column B of Sheet1. Problem is, when I put in a a formula, e.g.
=formula(B1)
then it changes to
=formula(B30)
when 29 new rows added
I want it to stay as B1, but it won't. If I use an absolute reference $B$1 then I can't copy the formula down the column.
Any wizards out there to help me out?
If you want to get the matching row from a column of another worksheet, then use INDEX and ROW, like so:
=FORMULA(INDEX(Sheet1!$B:$B, ROW(), 1))
This will always return the value in Column B of Sheet1, on the same Row as the formula is in on Sheet2 - even if you insert rows at the top of Sheet1
You can do "partially absolute reference" (I don't know the correct way of saying this).
You can lock only the column so would be =$A1 which means that it will never change the column but when you drag down the formula, it will change to =$A2, =$A3...
Or you can lock only the row typing =A$1 This way it will be locked on the row only.
You can do this also by pressing F4 several times: 1 time will lock both, the 2nd time will lock the row only, the 3rd time the column only and the 4th time will delete the locking.
the proper way would be to use INDIRECT like:
=INDIRECT("Sheet1!B1:B")

Resources