Making data appear from a dropdown list in Google Sheets - google-sheets

I'm trying to create a sheet that allows me to compare four different properties I'm considering taking a mortgage out on. It contains ranges where I input data (property value, deposit percentage etc) for each of the four properties, and then this feeds into four property displays below which shows me my monthly outgoings for each property.
I'm looking for a way to only see one data input range at a time, using a dropdown to access it. So I could select "Property 1" from the dropdown, it would bring up my Property 1 data input range, I could add the relevant information, and then select Property 2 and do the same etc.
I've tried creating each input range as a named range, and then using =IF to call them like this:
=IF(C8="Property 1",Property_one)
But this just brings up #VALUE! and the error "An array value could not be found."
Any help would be appreciated! Here's a copy of the sheet I've been working on – you can see where I've been faffing around with the =IF function at the bottom.
Thanks in advance!

try:
=INDEX(IF(C8="Property 1", Property_one, ))
or:
=INDEX(IF(C8="Property 1", Property_one,
IF(C8="Property 2", Property_two,
IF(C8="Property 3", Property_three,
IF(C8="Property 4", Property_four, )))))

Related

How to have VLOOKUP pull multiple instances?

I currently have a sheet where I'm organizing launches.
SAMPLE
Currently I have a overview sheet and a calendar sheet which pulls from the overview sheet according to date and event type.
=iferror(VLOOKUP(B$3&" "&$A4,Sheet1!$A:$D,4,0),"")
However, when there are multiple "TITLE EVENTS" on a single day, I have to create separate rows w/ "TITLE EVENTS 2" and "TITLE EVENTS 3" in order for VLOOKUP to differentiate and show all instances of title events on the calendar.
Is there a way (may be a lot more complicated) where I can just have a single "TITLE EVENTS" selection and have the sheet be able to create a new row under "TITLE EVENTS" on its own? (ideal look on sheet 3).
A more elegant option:
See here
=IFERROR(ARRAY_CONSTRAIN(FILTER('Date Registry'!$D:$D, ('Date Registry'!$A:$A)=(H$3&" "&$A5)), 4, 1), "")
Formatted:
=IFERROR(
ARRAY_CONSTRAIN(
FILTER('Date Registry'!$D:$D, ('Date Registry'!$A:$A)=(H$3&" "&$A5)),
4, 1)
, "")
See if this solves your problem:
I copied your sheet and modified it to look Sheet 3 but with formulas.
You can see it here.
I used the following formula on the Calendar sheet:
=IFERROR(INDEX(FILTER('Date Registry'!$D:$D, ('Date Registry'!$A:$A)=(E$3&" "&$A$5)), ROW()-4, 1), "")
Explanation:
=FILTER('Date Registry'!$D:$D, ('Date Registry'!$A:$A)=(E$3&" "&$A$5))
gets all values of the intended type (eg. TITLE EVENTS) and with the intended date.
=INDEX(FILTER(...), ROW()-4, 1)
The second parameter is the row number.
Row 5 is the row with TITLE EVENTS.
Therefore, ROW() - 4 gives the 1-based index of the row relative to row 5.
The third parameter is column number but since the range is only one column, it's always 1.

How do I fix error saying “Array arguments to GTE are of different size”?

I'm comparing a continuous list to see if the cells exist within a second list. It works as a single cell, but when I try to convert it to an array because it's connected to a form. Any clue how to fix or change the code to get it to work? The initial list is on the page but the comparison list in on a separate sheet called "Locations"
=ARRAYFORMULA(IF((B100:B)="",,IF(TEXTJOIN(", ", 1,
IF((E100:E*1>=Locations!D2:D)*(E100:E*1<=Locations!E2:E)*
(F100:F*1>=Locations!F$2:F)*(F100:F*1<=Locations!G2:G), Locations!C2:C, ))="",
"out of range", TEXTJOIN(", ", 1,
IF((E100:E*1>=Locations!D2:D)*(E100:E*1<=Locations!E2:E)*
(F100:F*1>=Locations!F2:F)*(F100:F*1<=Locations!G2:G), Locations!C2:C, )))))
Here's the link to the sheet. I'm assuming it doesn't work because it uses 2 differnet arrays. 1 from the Locations sheet and https://docs.google.com/spreadsheets/d/1OZSDju3hRyGyRfFhHJT2PLQ3DBvcfOAT1ZvNxB-J0DQ/edit?usp=sharing
GTE stands for Greater-Than-Equal, which tells me that the comparison arrays are of two different lengths. The Locations sheet only has 1000 rows, where as your VirtualCourseUpload has 50,500. Here a couple possible solutions:
Add 49500 more rows to the bottom of Locations to get it to work (scroll to the bottom of the sheet), or
Use a specific range limit instead of the whole column

Google Sheet > Translate String to Function Path

I am creating a summary sheet in which you can select a column title, and below you will get the Sum of this row.
I have a data validation picker that provides you the options, e.g. column "First Col", "Second Col", "Third Col".
Then I translate it using a switch to "A", "B", "C" (actual columns on the other sheet), and even add the full location, e.g. "OtherSheerB2:B10000".
The problem is how can I try to translate the String representing the column as the function path:
In this example, if you chose "Second Col", I will try =Sum("OtherSheerB2:B10000")
and fail :(
Is the idea I am trying even possible? or are there any other suggestion?
Ok so I think I found a solution using SQL e.g.:
=QUERY({OtherSheerB2!$A$2:$T$1000},CONCAT(CONCAT("select sum(Col",M1),")"))
When M1 contains the number of the columns I want to sum.

IF returns certain value if cell contains a certain phrase, but no blanks/N/A in between

I've tried looking for an answer to this online for a few hours now, but I just can't work out how you'd describe it, or find an appropriate answer.
I have a spreadsheet where I'm wanting to pull out an ID in Column A into a separate tab, but only if it contains a certain phrase that's contained in Column E. In this separate tab, I then don't want there to be any gaps in between the IF statements.
So for example I want the next tab to pull through the Action ID if column E contains 'Client'. If it doesn't, it searches the next row and so on until it finds one that does contain 'Client'. Row 2 on the separate tab would then continue the search, but it wouldn't be filled with something if it doesn't find the word 'Client' - it instead would continue searching down until it found one that has the word in.
So for example - if the first ID that contains the right phrase is in Row 5, I want it to appear on the separate tab in Row 2, underneath the heading. Then, if the second ID with the correct phrase in column F is in Row 11 for example on the main tab, I then want it to be pulled through to Row 3 on the separate tab. And so on..
This will then allow me to do lookups for the rest of the values I want to input on the separate tab.
I've tried as many different IF statements as I can, but it's just not having it.
Any advice would be really appreciated.
You can use INDEX and AGGREGATE combination:
=IFERROR(INDEX($A$2:$A$6,AGGREGATE(15,6,1/($E$2:$E$6="Client")*ROW($E$2:$E$6)-1,ROW()-1)),"")
In Google Sheets you can use FILTER (docs) for that. Place it in the top cell of your column.
={
"Your Header";
IFNA(FILTER(A2:A, B2:B = "Client"))
}
If A2:A and B2:B are from other tab named My Tab it will be 'My Tab'!A2:A and 'My Tab'!B2:B.

How to maintain the original header name when performing Google Sheets Query

Hi I have this working query that loops through an arbitrary range of data and produces the results I need:
=arrayformula(QUERY(Crew!A:DY,"SELECT E,A," & join(",", substitute("Count(`1`)", "1",substitute(address(1, column(Crew!F:DY), 4), "1", ""))) & "GROUP BY E,A", 1))
Unfortunately, this produces Columns that are labeled so:
count 18/12/2017 count 25/12/2017 count 01/01/2018
I need to force a display of the original column name, and if possible, the format, e.g. 18/12/2017 as this will allow me to perform further pivot or group by month type functions
I have experimented with different methods of adding a label at the end of the query, reduced the query to tests of the data without using the arrayformula, and searched through the queryLanguage Docs but all references seem to be related to applying a different text string rather than leaving the column header 'raw'
I suspect the main problem is my inexperience, I don't know the correct terms to search for?
How do I achieve this?
Cheers.
You need to use label construction:
"select ... where ... group by ... label ..."
Reference:
https://developers.google.com/chart/interactive/docs/querylanguage#label
You may get labels text with the formula:
="label "&ArrayFormula(join(", ",substitute("count(`1`) ", "1",substitute(address(1, column(F1:G1), 4), "1", ""))&text(F1:G1," 'dd/mm/yyy'")))
change F1:G1 to your range.
The shorter version of the formula with Regex:
="label "&ArrayFormula(join(", ",REGEXREPLACE(ADDRESS(1,COLUMN(F1:G1),4),"(.*)\d+$","count(`$1`) "&TEXT(F1:G1,"'dd/mm/yyy'"))))

Resources