I'd like to manipulate other cells based on the selection from a dropdown menu. For example in cell A1 I have a dropdown with company A, B, C
I need a formula for cell B3 to change the data based on the selection in cell A1.
EX:
If cell A1 selects Company A, I'd like to take data from another tab in my sheet that gives me data for company A and place it into cell B3.
If cell A1 selects Company B, I'd like to take data from another tab in my sheet that gives me data for company B also inside B3.
Basically summarizing different data based on selection of my dropdown menu.
Please try:
=if(A1="A",A!A1,if(A1="B",B!A1,C!A1))
Related
I want to block certain users/groups from viewing formulas in certain cells in Google sheet, but they'll have permission to edit other cells values. All they will be able to see is the result.
explanation: it's an advanced calculator. let's say that I want to give the user the ability to put values in cells A1 and B1, and in C1 the formula is =A1+B1.
I want to hide the formula in C1, so the user will only the the result.
There's a few ways to do it depending on how/who is working on the sheet. If people aren't familiar with sheets you can actually hide the formula in a row at the top by using array formulas so in the header:
={" header title" ; arrayformula(a2:a+b2:b)}
The formula would be hidden in the cell that shows the header, all the cells below would just be the calculation. If you hide the row that has the arrayformula and protect it no one will be able to see it. The only thing is you have to also protect the column otherwise if someone hardcodes a value in the column the formula will stop working.
The second option (easier but can run into more issues is the have a 'mirror' copy of the sheet they are interacting with in the same file as a hidden sheet. Basically a duplicate of the tab with all the cells a direct reference of the first tab. So:
Sheet1 = tab they interact with
Sheet2 = 'mirror' tab with every cell being ='Sheet1'!a1, but for the corresponding cell value.
As they edit Sheet the values entered in Sheet1 will show up in Sheet2, then the calculations can happen on that sheet, and then Sheet1, can just be a direct reference to that column in Sheet2. So the calculations in Sheet1 will only appear ='Sheet2'!C2. If you protect Sheet2 and hide it no one will be able to see the formulas. Sheet1 could even reference Sheet2 with an index formula like: index(column sheet2,,) which would return the entire column from sheet2.
I have a sheet with a dropdown menu in A1, and a cell A2, with values that will be the result originated from a script.
I want a certain option from the dropdown menu (the first one, to be precise) to be selected automatically when a certain value is present in A2.
Here's a simulation:
https://docs.google.com/spreadsheets/d/1x-pmDmB6mbyjXFY0rHOkIzkpNagRJXif9dWNj3TJHkU/edit?usp=sharing
In A1, I want to write the formula:
If A2 is equal or less than zero, I want option 1 to be force displayed/ automatically selected in A1.
If A2 is more than zero, then I want the manually selected option to remain as it is.
I'm not completely sure if we're talking about the same thing, but I believe this has a lot in common with how dynamic dependent dropdowns are created in Google Sheets.
The only main difference is that you don't rely on a dropdown choice for your condition, but any cell value of your choice.
So how does this work?
The value in G1 is:
=IF(F1>0,filter(B:B,A:A="POS"),filter(B:B,A:A="NEG"))
This basically means that if F1 is greater than zero, only the values in Column B, whose corresponding value in Column A is POS, show up in Column F.
If F1 is zero or less than zero, only the values of Column B, whose corresponding value in Column A is NEG, show up in Column F.
Accordingly, we can now use Column F (the range G1:G8) as a 'dynamic' reference for the data validation of a dropdown. In the example, this was done in F2.
This YouTube video explains the underlying filter mechanism pretty well. I just expanded it with an IF-statement.
I have created a tree view for stock.move model, which by default is grouped by the field picking_id.
Now I would like to know how to create a button in the line on which you click for deploying its content. I put an example:
I have Move A1, Move B1, Move B2, Move C1 and Move C2,
grouped by picking_id, so I have three groups: Picking A, Picking
B and Picking C. Now I would like to have a button in Picking A,
Picking B and Picking C lines, but not in Move A1, B1, B2, etc... The button should get its respective picking ID value and call
a method (it would be great a Python method, with possibility of using
env).
Anyone has any idea of how can this be managed or where could I start looking for information about this?
EDIT
I attach an image of my current view:
What I would like is to add buttons on each WH/IN/XXXXX line, which is the picking, and these buttons should call a method and pass it their respective picking IDs to know on which button the user clicked.
I have a sheet with dropdowns created using 'Data->Validation->List of Items which control what the user can input into these cells.
Once a user selects an item from a dropdown, is it possible to get the index value of the item selected? If so, how?
The ultimate goal of this question is to have formulae which translate textual information into number data via CHOOSE()
Example
A1 = Data->Validation->List of Items -> None,Apple,Orange,Banana
A2 = CHOOSE(A1,0,1.5,2.3,1.8)
User selects 'Orange' then A2 = 2.3
Obviously the above fails as CHOOSE(A1... results in an error as 'Orange' is passed, not the index value of Orange
It seems possible that what you want is:
=Choose(Match(A1,{"None","Apples","Oranges","Pears"},0),0,1.5,2.3,1.8)
or something very similar.
The documentation says that handsontable is one of cell types but the example only shows how to display it as a dropdown. Can I show a cell which has set of sub-cells inside it while preserving navigation model?
Let's say I have two cells: A1 is number, A2 is handsontable with 2*2 grid. When I am on A1 and press right, I want to go to A2(1,1). Another right click brings me to A2(2,1) and then out of A2.