Referencing cell value in formula vs cell address (for output like =FORMULATEXT() - google-sheets

I created a sheet that outlines what I'm looking for help on, would be so grateful for any help
https://docs.google.com/spreadsheets/d/1pTUgZnAJEnQy5pS3v5X8WrYGQFEwiuxcuk0Q5aC09zE/edit#gid=0
I basically want the output that =FORMULATEXT() gives but I want to reference the values inside the cell vs the cell address. What's the easiest way to do it?

values inside the cell vs the cell address
'=substitute(substitute(FORMULATEXT(E7),"B7","value_1"),"B8","value_2")'
based on my understanding.. this is what you r looking for.. just replace FORMULATEXT() cell address for the next use..
Please share if it works/not/understandable. ( :

Related

apps script sheets : First and last non-empty cell of the current row

I'm looking for a script that allows me to find the first nonblank cell of the current row (regardless of which row I'm in).
Once this cell is found, I would like to give it attributes like for example with setBorder.
I would then like to do the same with the last non-blank cell of the current row.
Finally, I would like to give another attribute to the cells in which I have data.
All this on the current row I'm on.
I hope someone can help me :) if I was not clear enough in my request, I remain at your disposal.
I thank you in advance.
good to you.

Locking formula values in google sheets

Question
I'm trying to make a google sheet for calculating my net income over a set period of time. I have all the things but one thing figured out. That one thing being, I don't know how to lock a value in a formula to make it say the same for when I select and copy the cell formula to other cells. I'm very new to google sheets (and any form of excel) so I don't have much idea as for what I'm doing. Some help would be greatly appreciated, Thanks in advance. If my question wasn't very clear or needs rewording please let me know and I will work to correct whatever it is that is unclear.
Edit
So I've been doing some searching and working on the sheet, and I've decided to drop one of the things I was going to do because it didn't make much sense. So now the situation is that I need to have a value change dynamically as I continue to add more rows. What I'm trying to do now is have the cell formula change to add together the cell, say B3, and the cell above it, B2, and have that stored on another cell. I don't really know how to go about doing this, so any help or advice is greatly appreciated. Thanks in advance and sorry for the sudden change.
EDITED
Based on your edited statement with ...need to have a value *change dynamically* as I continue to add more rows. What I'm trying to do now is have the cell formula change to add together the cell, say B3, and the cell above it, B2, and have that stored on another cell, I suppose this is what is your goal (feel free to correct me if I'm mistaken) :
Example:
Used =SUM($B$2:B) on cell C2:
If you want to just copy the value and paste, I believe that is CTL+SHFT+v. If you want to copy the formula and paste it so that it refers to the same cells when it's copied, then you need to change the references so that they are static. For instance, if the formula refers to A1 and you copy it one column over it will change to A2, and if you copy it one column over and one row down it will change to B2. If the formula refers to $A$1, it will always refer to A1. You can do this manually, or you can highlight the cell reference and press F4 to change it to a static reference.
Hope I understood the problem correctly.

How to refer to current cell (or this cell) in conditional format?

I'm in cell T6 and use this code:
=if(isblank(T6),,1)
so basically if it's not empty then convert to 1
example: if the user enters 'hi' or 'test' or 123 or whatever except blank spaces then I want the cell value to be 1
The above code is not working as I get #REF! error. If I refer to another cell, it works fine, but if I refer to the current cell, I got an error. The T6 is the current cell I want to put the script. Can someone show the correct code?
the formula you use is correct. the issue here is that you are creating a circular dependency by referring to a cell from the cell you are in and those happen to be same. the right course of action, in this case, is to use the formula in any other cell than T6 to track the user input of T6.

Sum of cells above the current one, including any rows inserted later

Now sure there may be better ways to do this but these are just questions of curiosity.
What is the placement of a cell itself called? Its address? Its placement?
Let's say I wanna add all the costs in D26 to D28 and show it in D29(total cell). I can just put in D29
=SUM(D26:28)
but let's say I'm constantly adding rows above under D28 but before D29. So instead I wanna make it so that the total cell can self-identify itself, then find the cell right above it, then add everything from D26 to the cell above the total cell.
=SUM(D26:28)
That is basically what I am trying to achieve.
Please answer if possible in a way that works for google spreadsheets.
This can be done with
=sum(D26:indirect("D"&(Row()-1)))
where indirect("D"&(Row()-1)) references the cell in column D with row number one less than the current row.
"D28" is called the address of a cell (in "A1 format", to be precise). The function indirect takes a string as its argument and returns the reference to the cell with the address given by that string.

Use last value from a specific Cell

I've looked everywhere for a solution with no joy and with no experience with Spreadsheet functions to figure this out myself, I've turned to asking it here.
Basically i need to display the previous value of a cell in another: I.E.
If cell B3 changes from 50 to 60, i need cell G3 to show 50.
I've tried:
=INDEX(B3:B; COUNT(B3:B))
with no joy.
we cant save data permanent when you delete your data in your sheet it wont save another place or it won't display anywhere

Resources