I'm trying to conditionally set the value of a cell if there isn't already a value in it. I want to use a separate column so as to not lose the formula if a value is put in. This is what I'm trying. It's just saying FALSE in the cell
=IF(ISBLANK(D2),D2=FILTER(Characters!G3:G9,Characters!B3:B9 = B2))
Remove D2=
=IF(ISBLANK(D2),FILTER(Characters!G3:G9,Characters!B3:B9 = B2))
Related
I'm using Google sheet to manage my budget (see sample below) where I add each of my expenses as a single entry (yes, sounds like a lot of work). I sometimes split the expense with my roommate but then I have to add the value and divide by 2 everytime.
I was thinking if I could use a checkbox next to the value that will automatically divide the expense number by 2 when I check it. Is this possible?
I'm open to simple suggestions other than the checkbox to automatically update the value. Thank you.
Using simple IF formula you can just check if the checkbox is true, if it is then it will divide the current value on column C by 2. Otherwise it will remain blank.
Formula:
=IF(D1,C1/2,"")
Drag down to other cells.
Result:
Suggestion, Alternate solution:
If you'd like you can make a table with a column for your roommate, instead of editing the actual column so you can see both values. And use this formula:
=if(NOT(D2=""),E2/2,E2)
You have a column for per head contribution/split. If the cell on roommate is blank then it will stay as the total value, if roommate has an additional then it will be added to total and split it by 2.
Or using arrayformula:
=arrayformula(if(NOT(D2:D=""),E2:E/2,E2:E))
Works the same as above you just have to fill the enter the formula in the first cell no need to drag down and it will automatically expand to rows/cells below just make sure that below cells are empty or it will return an error.
Additional - Using same cell
As you've mentioned in the comments. Here's a way to divide the original value without using another cell to store it. (Not recommended)
Formula:
=VALUE/IF(D1,2,1)
example:
=1000/IF(D1,2,1)
Result:
However, I do not recommend this. It is still best to make use of another cell to store the original value before making calculations to it.
Also, using this formula you have to change the value from the formula and not on the cell otherwise you will replace the actual formula.
You can try array approach-
=ArrayFormula(IF(D1:D,C1:C/2,C1:C))
Let's say Cell L:23 contains a certain value I search for. If the Value is found, I want it to print the Contents of a Cell Horizontal to it, say D:23, in a Cell I Choose.
How could this be accomplished?
In cell D23, I would use the formula: =IF(ISERROR(SEARCH("search_value", L23)),"Not Found",L23)
In short, this means that if the substring "search_value" is found in cell L23, print the content in L23; else print "Not Found".
In its entirety, it's saying if the SEARCH() query had found a match and doesn't return an error, the ISERROR() function it's wrapped in will return false, therefore it will print L23.
I would like to create a formula that does the following things:
Checks if a value given is present in a range of cells, then:
If it is present but is the LAST value in the cell, return n/a
If it is present but is the ONLY value in the cell, return n/a
If it is present and neither of the two conditions above apply, return TRUE
Example of what the results might look like:
Thy this in D1:
=arrayformula(if(C1:C<>"",if(countif(flatten(split(regexextract(A1:A,"(.*),.*"),", ",1)),C1:C)>=1,true,"n/a"),))
and this in C1 to get a list from items in Col A:
=arrayformula(query(flatten(if(A1:A<>"",split(A1:A,", ",1),)),"where Col1 is not null order by Col1",0))
Cell A1 has "200" in it. I want to use that "200" when I reference another cell.
For example: ='TestSheet'!A200
Instead of typing 200 above, I want it to point at cell A1 for the value. Something like ='TestSheet'!A&A1 , but that does not work.
Point to cell A1
='TestSheet'!A1
fix row 1 and change column A->... according
='TestSheet'!A$1
fix column A and change row 1 ->... according
='TestSheet'!$A1
fix all column and row A1
='TestSheet'!$A$1
I would suggest using INDIRECT and ADDRESS. In whichever cell you are using, put the formula:
=INDIRECT(ADDRESS(A1,x))
x is the column as a number and can also be referenced to another cell.
I want to change the current cell if a different cell is not blank AND if it is four days later then the date in that cell.
Why doesn't this work and would would be a solution that does?
= IF(AND(NOT(ISBLANK(E12)), TODAY())) > (E12 + 4)
I want it to check if the date cell is blank, if it is then I want the formula to cease, then if the condition has a value I want it see if todays date is greater then the other cells value plus 4. If it is, the conditional format will go into effect and turn the cell red. I'm basically trying to mimic and ELSEIF statement with an AND
Nevermind, figured it out, if you're having the same issue here's a working solution.
= IF(IF(ISBLANK(E12), FALSE, TRUE), IF((TODAY() > (E12 + 4)), TRUE, FALSE))