I would like to be able to sort the 'Country' and 'City' columns on the Countries page in the below Google Sheet but when I do so (sort option in A4 and B4) the data gets corrupted and the dependent dropdown lists don't work anymore.
Is this possible and how could I do it?
If possible, I would also like to be able to sort the information in the Country Dropdowns page (B3:E3) in a way that the above stated would still work.
Used in Aux Country Dropdown page:
=IFNA(TRANSPOSE(INDEX('Country Dropdowns'!$B$4:$E$15,, MATCH(Countries!A5,'Country Dropdowns'!$B$3:$E$3,0))))
https://docs.google.com/spreadsheets/d/1wPbWdUx1cAWVhMdrxm_x5Vdy_ExYsV6Srn_Lu3FXHJg/edit?usp=sharing
First of all for your Country Dropdowns sheet create some helper columns and do your sorting there. So for USA in cell G3 use this formula and pull to the left for other countries
=INDEX({B3;SORT(B4:B)})
Next. In your B5 cell in the Aux Country Dropdown sheet use this single formula:
=INDEX(IFERROR(HLOOKUP('mar Countries'!$A5:A,'mar Country Dropdowns'!$G$3:$J$15,{2,3,4,5,6,7,8},0)))
Finally fix your drop-downs in your Countries sheet by using in A5 this formula and drag down
='Country Dropdowns'!$G$3:$J$3
also for your B5 cell drop-down use the following formula and drag down
='Aux Country Dropdown'!$C5:$I5
Related
So the main idea is I want to put a Hyperlink on a cell that contains a formula, But google sheet don't like that.
I had 2 ideas.
1- Put the formula in cell A1 and the output of that formula is dumped into cell A2 which is gonna be Hyperlinked.
(I tried to use FILTER to pull data into the Hyperlinked cell but it would give me a #REF! error:Array result was not expanded because it would overwrite data in A2.)
2- Use some sort of apps-script of which I have very little understanding of, so I didn't find any scripts relating to my question.
I didn't understand the reason why you can't put a Hyperlink AND a formula in the same cell, But as far as I understood:
Hyperlink is a formula it self → =HYPERLINK(url, [link_label])
So instead of Hyperlinking our cell using the UI, we can use the formula form to Hyperlink the cell and use our formula in the place of [link_label] which is gonna be the name of our cell:
=HYPERLINK( url , [link_label])
=HYPERLINK("google.com", SUM(B2:B5 ))
I have a custom formula, code below, to extract the URL of cells containing hyperlinks. I need to do this for a whole bunch of cells, so I need to ensure the reference cell is correct.
However, I have to explicitly type out and manually modify the cell reference every time I use the corner drag function to expand the formula to other cells, as well as every time a row is added or deleted, etc - the reference doesn't smartly update the way it does for built-in functions.
Is there a way to update the script or otherwise induce Sheets to smartly update the cell reference?
Custom function script:
function GETLINK(input){
return SpreadsheetApp.getActiveSheet().getRange(input).getRichTextValue().getLinkUrl();
}
Starting sheet example:
A
B
C
Index
Cells with hyperlinks
Formula
1
Link Text 1
=GETLINK("C1")
2
Link Text 2
If I click and drag the corner of C2, I wanto see this output:
A
B
C
Index
Cells with hyperlinks
Formula
1
Link Text 1
=GETLINK("C1")
2
Link Text 2
=GETLINK("C2")
But instead I get this:
A
B
C
Index
Cells with hyperlinks
Formula
1
Link Text 1
=GETLINK("C1")
2
Link Text 2
=GETLINK("C1")
^ the same kind of non-updating happens if I happen to insert some rows/cells - the references just stay absolute and don't intelligently update.
Thank you!
Use this instead:
=GETLINK(CELL("address", C1))
Then add this function in your script to remove the $ returned by the CELL() function:
function GETLINK(input){
var rangeName = input.replace(/[^a-zA-Z0-9 ]/g, "");
return SpreadsheetApp.getActiveSheet().getRange(rangeName).getRichTextValue().getLinkUrl();
}
References:
Regex
CELL(info_type, reference)
am looking for help with this array formula to be done in a script to avoid the multiple generated rows that not needed for the dropdown menu
=ArrayFormula(if(C4:C="",,IFNA(if((D4:D<>"")*(F4:F<>"")*(H4:H<>"")=1,{"DONE","FOLLOW","DEFECTS"},{"DONE","DEFECTS"}))))
sample of the test sheet is here : https://docs.google.com/spreadsheets/d/1JEO2vNxirY2NT2tRAnRNQpfY3hfyTuM1ppoUIil4Aeo/edit#gid=1382187552
the resolved or the above formula that FOLLOW will only show when D, F & H is not empty
also I was willing to add an extra condition the dropdown menu will not be active if A:A is Empty
looking forwards to your kind help.
Thanks,
I must have been Googling and trialing/erroring in scripting for 4-5 hours now, I'm stuck in a (frustrating) loop.
I'm trying to create a drop-down filter in A1 which lists all of the values in C1:ZZZ1, and selecting one of the values hides all columns C1:ZZZ1 except the columns that fall under the selected value's merged cell.
Example from the below screenshot:
In A1 would show a drop-down pulled dynamically, which lists "Joe Adams", "Eagle Nest", and "Sabrina". If I select "Eagle Nest" in the A1 drop-down, all I would see is Column A, Column B, and Columns F, G, and H (since Eagle Nest is merged with these 3 columns). The rest of the columns would be hidden. Then, upon clearing the filter (drop-down), all columns would be visible. Is something like this possible??
INDEX/OFFSET is another option. In another sheet, (say Sheet2!A1): Create a drop down for Sheet1!1:1,
A2:
=INDEX(OFFSET(Sheet1!A1,,MATCH(Sheet2!A1,Sheet1!1:1,0)-1,90,3))
Syntax:
OFFSET(cell_reference, offset_rows, offset_columns, [height], [width])
I have two sheets: Sheet1 & Sheet2
Sheet1 has Dropdown menu "Dropdown_1" with choices: a,b,c
Sheet2 has "Dropdown_2"u, also with choices: a,b,c
Sheet2 has also a cell linked to the Dropdown menu of Sheet1 "Link_dropdown_1" showing the current selection.
Is there a way how i can update the selection of "Dropdown_2" based on the value in "Link_dropdown_1"? I don't want to synchronise the two dropdown menus bidirectional - just from Sheet1 -> Sheet2. In case my explanation is hard to understand - here is the example in sheets:
example sheet
Update:
Looking for a way to update a Dropdown Menu not a simple cell!
For example: "a" gets selected in "Dropdown_1" --> automatically select "a" in "Dropdown_2" as well.
Update 2:
Maybe my previous explanations were really misleading but i am NOT looking for a dynamically created dropdown menu or similar. I want to synchronise choices/selection of two dropdown menus that contain the same values.
Hope this makes it clear:
I use "Value_Dropdown_A" for some sorting in Sheet2. In case it its not needed for synchronising "Dropdown_A" to "Dropdown_B" just ignore it...