Take values from column and put into a row - google-sheets

In google docs I am tryignt to take the values from a column in one sheet and use them as column headings in another sheet without duplicates.
Thus if sheet1 has
a
a
b
f
g
g
Sheet 2 should have it as
a b f g
In Excel I would just use VBA code, how do I do it in a google sheets?
I know the command to get it into a column, but not into a row
=unique(sort('Acumen Lead Tracker'!X3:X64,1,true))
Thanks

Try in Cell A1 of the second sheet:
=transpose(unique(Sheet1!A:A))
where Sheet1 is the sheet where the values you want to use as headers are found in col A.

Related

Google Sheets Add Formula Automatically After New Row

I'm using Zapier to automatically send data to a google sheet and I'm looking for a solution that allows me to automatically add the formula I want in a column when a new row is added.
For example: In column K I'm using this formula:
=VLOOKUP(J2,'List of Employees'!A:B,2,false)
This VLOOKUP function is working properly but only if I double click and expand the formula.
How I can automate this and pass the formula to the next new row created by Zapier?
Clear column K and then enter in K2
=ARRAYFORMULA(IF(LEN(J2:J), VLOOKUP(J2:J,'List of Employees'!A:B,2,false),))
This formula should not be dragged down as it processes all contents of column J and create an output in column K.
I hope that helps?

Looking for Google Sheet Array Formula

Hello I'm trying to create a Array Formula for the following B and C columns but getting error,
but without Array Formula the formula works by dragging the formula to all the cells. So I need a Array Formula so I can restrict a formula for specific range, So when I add a new row anywhere in d middle the that row should be working without any formula.
https://docs.google.com/spreadsheets/d/1kc58OkoA3SysApgALJnecnIoK2uyPV6FlhyVRTUXXcI/edit?usp=sharing
So in the above link where there is a list of items in Sheet2 A:
and I importing the list to Sheet1 A: with Array Formula.
Now in D column dropdown list whenever we select an item it keeps removing the used items from C column.
So how to make work while adding Array Formula for B and C Column.
I suggest a complete chage of strategy ... in B1 Sheet2
=arrayformula(countif(Sheet1!D:D,A1:A))
then in C1 Sheet1 (nothing in B1 Sheet1)
=iferror(query(Sheet2!A:B,"select A where A is not null and B=0 "))
the red corner is a good indication that the item is reserved. https://docs.google.com/spreadsheets/d/1m_SACJtoN2k-c1p4C-eflh3pKLmv6YqP8BM2i0jDUhw/edit?usp=sharing

Arrayformula for Google Sheets doesn't work as before

Some week ago, an array formula I use in Google Sheets stopped working correctly:
=arrayformula(if(row(A:A)=1,"Convert Type",if(len(A:A)=0,iferror(1/0),iferror(vlookup(C:C,'Sheet2'!$A$2:$B,2,FALSE),"Error"))))
This formula is in Sheet1 column B1, in the frozen first row. What it is supposed to do is to take the values from Sheet1 column C, compare the values from Sheet2 column A, and insert the values in Sheet1 column B for those corresponding in Sheet2 column B (from Type1 to Type2). If there is a mismatch between the possibilities in Sheet2 column A and Sheet1 column C, the new value in Sheet1 column B will be 'Error.' The formula stops when there is nothing in Sheet1 column A (Timestamp).
Now, for some reason, all the values in Sheet1 column B are set to 'Error.' Something similar happened before when Google made a back-end update, but this time I can't figure out what I am supposed to change. Any ideas?
Example Sheet
Edit: made the text clearer and added a link with example.
Just adding a extra space in your formula updates the formula to correct values and I'm unable to find the source of the error.
Regardless, the formula was unnecessarily complicated and I simplified it a bit to it's core bone version. Try this instead:
=ARRAYFORMULA({"Convert Type";VLOOKUP(C2:INDEX(C:C,COUNTA(C:C)),Sheet2!A:B,2,0)})

Google Sheets: Absolute Reference in Formula when Adding Column

I have a spreadsheet that I want to calculate the average of the first three values in a row...
For example:
Column A Column B Column C Column D
Row 1 7/1/2017 6/1/2017 5/1/2017
Row 2 $934 $392 $214
So my formula is
=average($A$2:$C$2)
This works fine, until I add a new column to the left of Column A to add the newest month's data which now looks like this:
Column A Column B Column C Column D
Row 1 7/1/2017 6/1/2017 5/1/2017
Row 2 $934 $392 $214
The issue is that spreadsheet automatically changes the formula to
=average($B$2:$D$2)
when what I really want is to retain the original formula so it will continue to give the the average of the most recent three months of data.
Here is a link to a spreadsheet so you can see what is happening, sheet one is before added column, and sheet two is after adding column.
https://docs.google.com/spreadsheets/d/1XE2zyFGCHUfSf44vNHwXij59I68LJEL_L7cNSf0-uag/edit?usp=sharing
How can I do this? Thanks!
I suggest a sensible place to put such a formula is in ColumnA (having made room for it!) hence:
=average(OFFSET(A2,,1,1,3))

Referencing a cell into a formula

This question pertains to Google Sheets. In column F of one "List" tab of my sheet, I have the name of all the other tabs in my sheet. All the other tabs contain information specific to one single topic. Im trying to get all of column N in "List" to pull up cell G2 of each sheet. So far, ive been using this:
='(sheet name)'!G2 ;in the N column, changing (sheet name) manually and individually
But I'd rather have the content of the F fill the (sheet name) part of the formula. Any way to do so?
With sheet names in column F, in N1 enter:
=INDIRECT("'" & F1 & "'!G2")
and copy down. Please note the single quotes in the formula.
This should work for both Excel and Google Sheets.

Resources