I'd like to get the value of a cell depending on the value entered in another cell. I have different sheets in my workbook :
Sheet 1: One with a list of people and adresses
Sheet 2: One with a list of orders from these people
In Sheet 2, when I choose a client's name from the dropdown list (created via data-validation list with sheet 1), I'd like his address to display automatically in another cell (same row, different column).
Is there a way to do that ?
Thanks in advance !
A simple vlookup will do this. Assuming you have the dropdown in A2 of Sheet2, put this in Sheet2 in the column you want the address in. If you have a dropdown in each row, drag the formula down:
=iferror(vlookup(A2,Sheet1!A2:B4,2,false))
Related
I have a Sheet like this [minimal] example. The "Data" tab is a running list of points different groups have scored. This is constantly updating. The "Results" tabs gets a list of all the unique group names from the Data tab and add them as a row in Column A. So, if an entry for "Group5" is entered on the Data tab, a row with that name will appear on the Results tab. Similar for the columns on the results tab. Each unique action on the Data tab becomes a column on the results tab.
I would like to add a "Total" column to the last column on the Results tab. The problem is, if a new "action" category appeared on the data tab, it would take up the last column and the Total column would need to shift over one. Is there a way to get the "Total" column to float so that it is always on the end without conflicting with the query formula?
In B1 cell put below formula-
={TRANSPOSE(UNIQUE(QUERY(Data!C2:C, "SELECT C where C is not null",0))),"Total"}
In B2 cell put below formula then drag down and right as needed.
=IF(OR($A2="",B$1=""),"",IF(B$1="Total",SUMIFS(Data!$D$2:$D,Data!$B$2:$B,$A2),
SUMIFS(Data!$D$2:$D,Data!$C$2:$C,B$1,Data!$B$2:$B,$A2)))
I have two sheets Sheet Main and Sheet Unique
On sheet Main, I have a range of data with headers
On sheet Unique in cell A1 I have a drop-down of all the header names from sheet Main
In cell B1 of sheet Unique, I have the formula
=SUBSTITUTE(ADDRESS(A1,MATCH(A1,Main !A1:AA1,0),4),1,"")
Which gets the Column letter of the header on sheet Main from the dropdown on sheet Unique
Is cell A2 on sheet Unique I have the formula
=SORT(UNIQUE(TRANSPOSE(ARRAYFORMULA(TRIM(SPLIT(JOIN("|",Main!F2:F),"|"))))))
Which gets the unique list of elements from the column on sheet Main that was selected from the drop-down on sheet Unique.
In this case, F2:F is the range on sheet Main of the selected header from sheet Unique
I want to update the formula
=SORT(UNIQUE(TRANSPOSE(ARRAYFORMULA(TRIM(SPLIT(JOIN("|",Main!F2:F),"|"))))))
automatically every time I make a new selection from the Drop-down on the sheet Unique
Combing the two formulas I get and adding INDIRECT
=SORT(UNIQUE(TRANSPOSE(ARRAYFORMULA(TRIM(SPLIT(JOIN("|",Main!&INDIRECT(SUBSTITUTE(ADDRESS(Y1,MATCH(A1,Main!$A$1:$AA$1,0),4),1,""),"|"))))))))
I get the error formula parse error I can not get what I am doing wrong!
Thanks for any assistance
Try this in cell Unique!A2:
=unique(sort(indirect("Main!"&substitute(address(1,match(A1,Main!1:1,0),4),"1","")&"2:"&substitute(address(1,match(A1,Main!1:1,0),4),"1","")),1,1))
Test sheet
I have an Options sheet that categorizes transactions based on their type. In the Transactions sheet, I add transactions with their corresponding category, and I am trying to create a formula where the corresponding category type is automatically added in the column next to it.
I have been able to create a partially working formula:
=ARRAYFORMULA(FILTER(Options!C:C,Options!B:B=D31))
I want to expand it across all the cells in column E using an ARRAYFORMULA, but I can't seem to figure out how to have the Options!B:B=D with the corresponding cell. Making it =D31 I've been able to figure out, but having one formula at the bottom (at Ref 1) and then the right category type for each corresponding cell, I have not.
use in E2:
=ARRAYFORMULA(IFNA(VLOOKUP(D2:D, Options!B:C, 2, 0)))
I have a sheet which imports data from a different sheet.
I inserted the sheet ID of the imported sheet in cell A1 to make it easier for me.
I need something that I can give a ROW and it will always return the right most / last non-empty value. That is, it automatically updates whenever we add a column in the imported sheet.
I've found this formula to show the last value of row 9 of the same sheet:
=FILTER(9:9,COLUMN(9:9)=MAX(FILTER(COLUMN(9:9),LEN(9:9))))
But I'm struggling to show the last value of row 9 of the IMPORTED sheet. How can I connect this formula with the imported sheet, that means with the Sheet ID (inserted in my new sheet in cell A1)?
Thanks a lot!
Assumes the relevant row number is entered in A2. Ugly but might be good enough:
=index(indirect("Sheet!"&row(A2)&":"&row(A2)),MATCH(1E+100,indirect("Sheet!"&row(A2)&":"&row(A2),1)))
Replace Sheet as appropriate.
I have a document with several sheets.
Each sheet has a range of cells (on the same row, spanning multiple columns) that are specific to that sheet (sheet "description").
I want to make a "table of contents" sheet that shows the name of each sheet and next to it, show the above mentioned range of cells as they are in each sheet.
I've tried with =ARRAYFORMULA(Sheet1!C2:AJ2) and with =IMPORTRANGE("sheet-ID"; "Sheet1!C2:AJ2"), but both of them brin in just the cell data, not their formating.
The formating includes: cell merging, font, background color.
How could I mirror on the "Table of contents" sheet, the "description cell range" of each sheet?"
This is not possible by using formulas. Instead you should use copyTo(Range) or copyTo(destination, options) methods from Google Apps Script.
I know its too late, but for new visitors.
You can use sort function. Simply add a sorted column to your range. Then sort the whole range again on your new sheet by the new column.