Excel - Circular References (all values change when one changes) - forms

I have several products. Each product has four different dimensions, and they're each dependent on one another. Meaning, if I know one, I know the rest of them.
Each product is different, so the way that they depend on each other is different. But the fact of the matter doesn't change-if i know one value of any dimension - i know the rest.
I'd like to be able to just type in a value into the cell and have excel automatically populate the rest for me.
It's too tedious with VBA and i'd like it to be automatic upon entry, and not have to have someone click a button. Just when you type it in.
Thank you

What you want is impossible without VBA. I offer you a simple method instead:
There's an infinite amount of ways to do that. I want some SE points. So, I will just post the first method that comes to mind.
Have two rows:
Input: [Height] [Width] [Length]
Result: [Height] [Width] [Length]
(the above will have the following shape:)
A1 B1 C1 D1
A2 B2 C2 D2
You don't touch the result row. You input into the blank input rows and then the result rows check for the input and calculate accordingly.
In the result row, you will use "nested if", NOT(ISBLANK(A1)) and your own calculation method. Here's an example of nested if: =IF(NOT(ISBLANK(A1)),A1*2,IF(NOT(ISBLANK(B1)),B1*3,IF(NOT(ISBLANK(C1)),C1*4, IF(NOT(ISBLANK(D1)),D1*5))))
Each cell in the result row will require a different calculation formula.
I suggest you open a brand new excel worksheet and paste the above formula into cell A2. Then, type a number into either A1, B1, C1 or D1 and notice what happens in cell A2.
Also, please note the above formula has not been "fixed". If you drag the formula, excel will try to adjust it and things can go bad.

Related

Flutterflow: Filter Column in a Datatable When Checkbox Clicked

I have a data table in FlutterFlow. I want to create a simple search filter using checkboxes to filter certain columns in a particular way depending on which checkboxes are checked. For example, imagine that I have the following checkboxes:
a10
a7
a5
These checkboxes correspond to different columns on the data table. Let's say that someone checks on "a7". That would mean that I want to filter by column a7. In particular, I want to filter the results from the database so that only return those values which are 10 or higher in column a7 appear in the data-table.
Similarly, if someone clicked on a10, then I would want to only return those values which are 10 or higher in column a10.
And if they checked both a7 and a10, then I would only want to return values which are higher then 10 in BOTH columns.
Now, the problem is, I can't figure out how to properly sync up the check-boxes with the data-table. I keep running in circles when I try and create a filter on the data-table to filter via the check boxes.
Any idea how I could do this?
Thanks.

Determining the lowest ever value of several ever changing cells

I have a row of three cells with constantly changing values. Cell 4 I wish to display the lowest value ever achieved by any one of the 3 cells. By definition the value of cell 4 can only go down, not up.
I am not sure there is a simple way to achieve this using only Calc built in functions, but attach an event macro would do the trick.
Say your 3 cells are: B1, B2, B3
Then in B4 =min(B1:B3)
Then put an event trigger on B4 using a code similar to this post.
The trigger code in Modify_modified should check if B4 is smaller than B5. If it is, then write the new min value in B5.

LibreOffice Calc: How to use a variable in a function/formula?

Before
After
I'm trying to dynamically fill a range of cells in a column based on a number in another cell.
So, fill x amount of cells with a value set in, say, E4. x is the value in cell E5.
If cell E4 = 25, fill the cells in the desired column below a certain point with "25" for x amount of rows. If E5 = 5, and the start point is A3, it would fill A3 through A8 with "25" or whatever desired string or formula.
For me, it's ="Layer " & ROW() - 2 and I want to fill every cell in that column to a range determined in E5. The amount of cells in that row would change dynamically with whatever is set in E5
Problem is, I can't find a way to set a variable and retrieve it's value in a single cell's forumula, and I can't use nested formulas either (SUM(Var1:E1) where Var1 is the string E2 or something like that)
In this case, starting at cell A3 = Layer 1, it would named each cell Layer 2, and then Layer 3, until the layer number matches the value in E5.
I also need to be able to count how many layers there are for a forumula in the next column that depends on the total number of layers (plus 1)
I don't really know a ton about Calc or Excel formulas, but they don't follow a convention that makes sense to me.
I would guess a nested sum function would work like: =SUM(SUM(A1:A5):A6) or =SUM((SUM(A1:A5)):A6) but it doesn't. And it doesn't seem like there is a way to set variables inside one cell's formula.
I also tried creating a string that would create the relevant cell reference and thus the right value, like =("E"&E1) which would create E5 if E1 was set to 5, but I can't use this value as a cell reference
To get the result shown in the images, enter =IF(ROW(D1)<=E$1;"Layer " & ROW(D1);"") in cell D3 and fill down to D10 by dragging the dark dot in the corner. Then change the value in E1 to see the difference.
The $ means do not change the following 1 in the reference when the formula is copied or filled elsewhere. Otherwise the formula references will be adjusted relative to the new location.
If I use =("E"&E1) to create "E5" based on the value in E1, I want to use the E5 as a cell reference and not a string.
That is what INDIRECT does.
=SUM(SUM(A1:A5):A6)
It should be =SUM(SUM(A1:A5);A6) instead. The first one is a range of cells, whereas the second gives an additional cell to include. You could also do for example =SUM(SUM(A1:A5);A6:A10).
I don't really understand why you would expect a : to work where the ; is. That would define a range that starts at the row of the result of the SUM and ends at a cell I suppose? Doesn't make sense to me. Maybe you intended something like =SUM(INDIRECT("A"&SUM(A1:A5));A6). Still I don't get why anyone would want to do that.
Spreadsheet formulas are different from programming languages. It may take some time to learn how to use them effectively. LibreOffice also has extensive support for macros if you need an actual programming language, although in most cases there is probably a better way to solve the problem without resorting to macros.

How to avoid CIRCULAR REFERENCE in TABLEAU using LOOKUP and PREVIOUS_VALUE?

Hello!
In Excel I have 2 columns C and D with formulas in there for a specific purpose.
As an Example I have here cells C12 and D12 in these 2 columns to show he formulas.
C12 = 0.001855 * B12/E12 + 0.998145 * (C11+D11)
D12 = 0.981119 * (C12-C11) + 0.018881 * D11
Let's say the C-column variable is "Running Base" and the D-column variable is the "Growth" and the rows are months. And say I want to copy these formula's to a Tableau worksheet with months in the rows.
You see that C12 is using both it's own previous value C11 (the lag -1 of C) and the lag -1 of D (D11). I can find C11 in the formula in TABLEAU using the PREVIOUS_VALUE function and the previous value of D with the LOOKUP([D],-1) function (the B12 and E12 are not important for the discussion).
Then D12 is also using it's own previous value D11 and both C12 and its previous value C11. Of course we can do similar TABLEAU exercises here, but you already feel a CIRCULAR REFERENCE error coming up ;-).
So, there is no actual CIRCULAR REFERENCE and it's working in Excel. But I do understand why TABLEAU is giving one and I am sure there must be a work-round to this.
Can anybody help please???
Thx very much in advance!!
Herman Mentink
One way to solve this is to drop the calculation in Details part of the Marks and then reference the rows of that field in calculation which doesn't create a circular reference else you are correct tableau will create a circular reference error as behaviour is different from Excel.
Edit----------------------------------------------------------------
Not just a tool tip infact you can use those in calculated fields aswell, Few months back I have implemented same in my report.
A calculation creates 4 rows in my report and I need to do (1st row+4th row) in the same column, so I dropped the calculation in Detail on the Marks and referred same another calculated field. Just check the below example code:
LOOKUP(ATTR([Values]),FIRST()+4) + LOOKUP(ATTR([Values]),FIRST()+1)
Values is the calculated field now above caluction is referring to Values and picking rows 2 and 5 which I can't use directly on the Values column if I drop Values on Text in Marks
In the above image values in detail is original calcualtion and the one I used in text is the referring to values and displaying.

D trigger scheme test

I want to test my D trigger scheme and I don't know how to do that. I don't even know how "truth table" works and maybe someone can help/explain how to make a test for my D trigger scheme?
A logical table works as follows:
Each row represents a case, each column represents a statement. A cell represents the logical value of a statement. It is wise to differentiate mentally atomic columns from molecular columns. In your case, you have three atomic columns, they represent the cases. These are the first three columns in your logical table. The other columns are molecular columns, that is, their value is composed by other columns.
D is said to be the value of XOR-ing the third and the fifth column. If you look in each row the value of the third and the fifth column in the table, you will see that D4 is true (1) if they differ and it is false (0) if they are similar.
I am not sure what do you mean by testing the D trigger scheme, but if by that you mean that we should test whether the formula matches to the values, then we can say that yes, it matches, since the general concept of XOR is matched in all cases in your logical table.