Ok. I'm Having A Problem With A formula That Seems Really Basic. It Uses The If Function. Here's What I Need.
If(b2:b50<>"",IF(b2:b50"607734",e2:e50="Patriot"))
So Basically If Between b2-b50 Has The Number "607734" I Want e2-e50 To Display "Patriot"
You need to put the IF statement in the cell where you want the value. For example, in E2, enter =IF(B2="607734", "Patriot", "") and drag it down to E50.
For each cell you have to enter the formula, which goes like this.
If(logical_test,value if true, value if false)
So, if b2 =607734 then c2 = "Patriot" else c2= " "
Now as formula we can write this as
if(b2=607734,"Patriot","")
similarly, for other cells(c3,c4,c5,c6....c50) we have formula in each cell as :
if(b3=607734,"Patriot","")
if(b4=607734,"Patriot","")
if(b5=607734,"Patriot","")
if(b6=607734,"Patriot","")
........
........
if(b50=607734,"Patriot","")
Your IF statements don't satisfy the else conclusion.
The format of an IF statement in Excel is as follows:
IF(parameter, what to do if parameter is true, what to do if parameter is false).
Right now you've filled in the first two variables for the IF command, but you left the third blank.
e.g.
Could have:
If(b2:b50<>"",IF(b2:b50"607734",e2:e50="Patriot", " ")," ")
And in that case it would put a space in the cell if the first two conditions are not met.
Related
I have an Excel spreadsheet with 7 cells (in a column) with data in, these are C13 to C19
I have a formula that combines all the data in these cells together and puts it into one cell, this formula is =C13&", "&C14&", "&C15&", "&C16&", "&C17&", "&C18&", "&C19 and works fine. However, can I alter this formula to miss out on any cell that contains the text "Nothing else carby"?
You may, in Excel 2019, use:
=TEXTJOIN(", ",,IF(C13:C19<>"Nothing else carby",C13:C19,""))
If "Nothing else carby" can be a substring inside a cell's value, try:
=TEXTJOIN(", ",,IF(ISNUMBER(FIND("Nothing else carby",C13:C19)),"",C13:C19))
Confirm through CtrlShiftEnter
The formula should not be that long, as you can see:
=TEXTJOIN(",",TRUE,IF(C13:C19="Nothing","", C13:C19))
(I just used "Nothing" instead of the whole word for readability reasons.)
Explanation of the parameters:
"," : delimiter: between every cell content, a comma is added.
TRUE : treatment of blank cells (don't put them).
IF (...) : In case cell content is "Nothing", put an empty string.
In combination with the previous parameter,
just one comma will be put in the result:
"a,b,c,e,f,g" and not "a,b,c,,e,f,g" (see result).
Used data:
a
b
c
Nothing
e
f
g
Result:
a,b,c,e,f,g
I am trying to write a statement which will read the content of the adjacent cells and select a value depending on the results to punctuate a paragraph. Just like the below sentence is laid out.
Statement 1, Statement 2, Statement 3.
A comma is included if the next statement has content. A full stop is included if the next statement does not have content. Nothing is included if the next and previous statements do not have content. I have used the formula below, but the bit that's supposed to add the full stop is returning FALSE:
=IF(A1<>"",IF(C1<>"",", "),IF(A1<>"",IF(C1="",". "),IF(A1="",IF(C1="",""))))
What have I done wrong?
I believe you have overcomplicated your formula. For example you test up to 3 times if A1 is blank
Are you trying to achieve this ?
=IF(A1<>"",IF(C1<>"","; ",""),IF(C1="",". ",""))
if A1 is not blank and C1 is not blank = ;
if A1 is not blank and C1 is blank = nothing
if A1 is blank and C1 is blank = .
if A1 is blank and C1 is not blank = nothing
The IF statement has this format: =IF(<Statement>, <Value_If_True>, <Value_If_False>)
If we break your code down in the same way, we get this:
=IF(<Statement1>, IF_TRUE1(<Statement2>, <Value_If_True2>), IF_FALSE1(<Statement3>, IF_TRUE3(<Statement4>, <Value_If_True4>), IF_FALSE3(<Statement5>, IF_TRUE5(<Statement6>, <Value_If_True6>))))
The missing <Value_If_False> will return FALSE by default.
Now, that might be a bit hard to read, so here's another layout:
Hopefully you can see all of the duplicate "question" nodes there - and also that the "." is impossible to reach, because it requires that A1<>"" is FALSE, and also TRUE.
Rewriting your code, there is still 1 "missing" terminator:
=IF(A1="", IF(C1="", "", FALSE), IF(C1="", ".", ", "))
(Or, if you want to be really fancy, use a CHOOSE statement:)
=CHOOSE(1+(A1="")+2*(C1=""), ", ", FALSE, ".", "")
This part of your formula seems redundant as it is already captured in the initial logical arguments:
IF(A1<>"",IF(C1="",". "),IF(A1="",IF(C1="","")))
I might not understand your objective entirely, but this should do the trick:
I'm assuming statements here are defined by inputs into columns A,B & C and column A has to be filled first.
=IF(A1="","",IF(AND(B1="",C1=""),". ",", "))
If I'm way off, do share your table/sheet structure with desired results.
Ok, had a go at this just to see:
=IF(AND(A1="",C1=""),"",IF(AND(A1<>"",C1<>""),A1&";"&C1,A1&C1&"."))
And if both are not blank, then they should be separated by ";" and finished with "." ...
=IF(AND(A1="",C1=""),"",IF(AND(A1<>"",C1<>""),A1&";"&C1&".",A1&C1&"."))
See:
I'm trying to find a formula in which K4 returns completely blank when J4 is empty. As you can see in the image, it's returning £0.00, but I need it to be blank?
this is how you do it in Google Sheets:
=IF(LEN(J4), IF(J4="Won", H4*I4, 0)+IF(J4="Lost", 0, 0), )
and whole your formula can be shortened to:
=IF(LEN(J4), IF(J4="Won", H4*I4, 0), )
If you want to return a true blank, just skip the return argument
For instance
IF(J4 = " ",)
If this does not work due to formatting disagreements with the above equation, you can return a blank with the below as well
IF(J4 = " ", IFERROR(0/0))
I might be wrong, but I don't think you can enter a formula and get a completely blank return value.
The next best thing you can do is return a zero-length string "" -- which isn't the same as a blank cell but might work for you nonetheless.
Maybe you can nest your formula in =IF(ISBLANK(K4),"",<put the rest of your formula here>).
I have a value in the cell A1 that can be "PERSON, REGISTRATION,CONTRACT"
Then I have to add in the cell A2, an hyperlink to another spreadsheet:
If the value of cell A1 is PERSON go to spreadsheet2
If the value of cell A1 is REGISTRATION go to spreadsheet3
If thevalue of cell A1 isCONTRACT go to spreadsheet4
How can I do this please ?
Thank You -
Something like this:
=HYPERLINK("#'" & CHOOSE(MATCH(A3,{"person";"registration";"contract"},0),
"Sheet2","Sheet3","Sheet4" ) & "'!A1", "Go")
Edit: some explanation
MATCH(A3,{"person";"registration";"contract"},0) -finds the position of the value in A3 in the array of possible values.
Given that position, use CHOOSE() to pick the correct one from the three possible worksheet names to use in the hyperlink address.
The rest is just stringing all of that together to create the link formula.
Try this one:
=HYPERLINK("#"& LOOKUP(A1;{"contract";"person";"registration"};{"sheet4!";"sheet2!";"sheet3!"}) &"$a$1";"LINK to " & LOOKUP(A1;{"contract";"person";"registration"};{"sheet4!";"sheet2!";"sheet3!"}))
It is important the lookup_value must be in alphabetical order and you should be sort the lookup_vector accordingly.
=IF(D3="+";I3("test1");I3("test1"))
The cell with the code just says "#REF!"
Its probably a sintax error..
What i want is: If the cell D3 is equal to "+" then the value of the cell I3 must be equal to "test1"
What you are asking for is impossible using formulas.
A formula can only alter the cell it is written in, it cannot alter any other cell.
Use of vba would be required to make this type of change.
It's syntax. Remove the () in the True, False components and use commas, not semicolons. Type this formula in Cell I3.
=IF(D3="+","test1", "")