The formula I created for a Google Sheet is not working. Seems to be a logic error but I'm not sure what I'm doing wrong here.
This formula is being entered into F3:
=IF(OR(C3="",D3="",E3=""), "", TODAY())
I thought this would do it. If C3 is blank OR D3 is blank OR E3 is blank, then leave the cell blank, else show today's date. It's treating it like an AND statement and only putting today's date if all three cells (C3, D3, E3) have something in them.
this pretty much works. perhaps try:
=IF(OR(C3=""; D3=""; E3=""); ; TODAY())
perhaps you need AND:
=IF(AND(C3=""; D3=""; E3=""); ; TODAY())
I figured it out. My logic was off. I needed an AND not an OR because if any of the cells were = "" the OR was TRUE and therefore "" unless all were filled in
Correct formula:
=IF(AND(C3="",D3="",E3=""), "", TODAY())
Related
Been trying to make this work for about a half hour or so and looking up references to ISBLANK or is null... isn't working as expected, even if it I reverse the THEN values.
What am I missing?
H4 =IF(ISBLANK(H3),"empty",B2+4/24)
// H3: empty
// B2: 7:30 AM
// RESULT: 11:30 AM
H4 =IF(ISBLANK(H3),B2+4/24,"empty" )
// H3: empty
// B2: 7:30 AM
// RESULT: empty
Have looked at Google sheets help, various Stack Overflow answers, but still unable to get this to work.
ACTUAL OUTPUT
EXPECTED
When the formula itself looks perfectly fine, but the result is not showing what you expected, try to test the input values with =ISBLANK(), =ISDATE(), etc. to see if there is any formating issue.
=IF(ISBLANK(H3),"empty",TEXT(B2+4/24,"hh:mm"))
you can also try formating the input data with TEXT() function.
How to make my ARRAYFORMULA(A1 + something else) to stop producing results after there are no more values in A1 column, eg. to skip blank values. By default it gives endlessly "something else".
Here is my demo sheet:
https://docs.google.com/spreadsheets/d/1AikL5xRMB94BKwG34Z_tEEiI07aUAmlbNzxGZF2VeYs/edit?usp=sharing
Actual data in column A1 is regularly changing, rows are being added.
I tried the others and they didn't work. This does though:
=ARRAYFORMULA(filter(A1:B;A1:A<>"";B1:B<>""))
use:
=ARRAYFORMULA(IF(A1:A="";;A1:A+1000))
You can try this formula =ARRAYFORMULA(IF(ISBLANK(A1:A),"",(A1:A + B1:B))) if this works out for you.
Reference:
https://support.google.com/docs/answer/3093290?hl=en
I'm trying to build a workout tracker like shown here
Here is a copy of what I have with dummy data.
Current Attempt/what I've tried/want/notes:
I'd like to have one dashboard (Sheet: Dashboard!) instead of two, where both cells B2 or C2 could be drop downs and I'd like to have it so that the most recent selection takes precedence over the other rules. Currently I've managed to merge the filters with some clunky stepwise IF/THEN, but the final false value supersedes the others, instead of resetting the view.
=IF(
AND(B2="",C2=""), //CONDITION
FILTER(D1S!A1:AA,D1S!B:B=max(D1S!B$5:B1006)), //TRUE VALUE/VIEW
//Maybe OR() around entire FALSE VALUE?
IF( //FALSE VALUE/VIEW
B2 <>"", //CONDITION
FILTER(D1S!A1:AA,D1S!B:B=B2) //TRUE VALUE/VIEW
//AND Change C2 to string 'Exercise' //DESIRED
If( //FALSE VALUE/VIEW
C2<>"", //CONDITION
sort(filter(D1S!A:AA,D1S!C:C=C2),2,FALSE) //TRUE VALUE/VIEW
//AND Change B2 to string "Date" //DESIRED
As a result, I don't think conditionals are the way to go here- instead I think Filter may be better. I just don't know the simplest way to do so for both.
Desired outcome:
Essentially, If both B2 and C2 are blank, get the most recent date workout filter view, If either is filled, then get that view which was most recently selected and make the other cell "blank"/ altered to a header string (eg "date" or "exercise").
EG:
When you open the dashboard- nothing is filled so you get the most recent data.
Then if you select a date in B2, from the drop down you get that filter (ignoring/making C2 say "exercise". Then, with this view, if you select an exercise, it will 1- blank out the value in B2 and say "date" and then 2 the view will just be the filtered view of the exercises.
I hope I explained that clearly. Please let me know if any further clarifications are needed!
add one row above then paste this into B1:
={""; ""; "Date"}
next, paste this into C1:
={""; ""; "Exercise"}
now you can hide row 1 and perhaps change color to reddish and paste this into A3:
=ARRAYFORMULA(QUERY({IF(ISBLANK(D1S!A3:A), D1S!A3:A, ), D1S!B3:AA},
"where 9=9 "&
IF(B3="Date",," and Col2 = date '"&TEXT(B3, "yyyy-mm-dd")&"'")&
IF(C3="Exercise",," and Col3 = '"&C3&"'")))
demo sheet
I'm trying to highlight a row if the number of blank cells between say, C1 and E1 = 3
and then copy this down for every row.
I've tried using:
=IF(COUNTBLANK($C1:$E1)=3)
But it's not working, can anybody help?
Under conditional formatting, your formula should be the following based on what you've given. The reason is conditional format is trying to see the result as TRUE or False. The IF statement is trying to tell the computer what to do when it's TRUE or FALSE.
COUNTBLANK($C1:$E1)=3
if you want to use IF you will need to do it like this:
=IF(COUNTBLANK($C1:$E1)=3, 1)
I'm trying to write a formula using an IF and Networkdays function. I basically want this formula to look in column J3 and see if there is a date. If there is a date the it should return the number of work days between the completion date and the discovery date.
If J3 (completion date) is blank, which means it hasn't benn completed, then I just want it to return blank
Try something like this:
=IF(J3 = "", "", NETWORKDAYS(A3, J3))
You already had 50% of the formula.
The IF statement will check whether or not J3 is blank (i.e. ""). If that is true, it will return a blank value. If it's false meaning that there is something in there, it will return your formula.
Let me know if that works.
Here is the formula that I use:
=IF(NETWORKDAYS($G7,$H7)>0, NETWORKDAYS($G7,$H7),"-")