I am trying to create a formula which picks ">" or "<" sign depending upon whether any record has "Higher" or "Lower" against it.
For example, if A1 has "Higher", then formula in B1 should be =0.78>0.59
If A2 has "Lower", then formula in B2 should be =0.78<0.59
Try,
if(a1="higher", 0.78>0.59, 0.78<0.59)
'alternate
=or(and(a1="higher", 0.78>0.59), and(a1="lower", 0.78<0.59))
use this as formula.
=IF(A1>B1,">","<") in cell C.
than use this formula to get your desired look in next cell. =CONCATENATE(A2,C2,B2)
You can hide Column C if you don't want to show it.
Check it by clicking following link,
Related
This question is linked to Formula to remove every middle name in a cell in Excel.
I basically want to make an if else statement in excel. So the IFchecks if the cell is equal to "Gian" OR"Pier", if the condition is confirmed the formula proceeds to use this other formula
=IFERROR(LEFT(A2,FIND(" ",A2)-1),A2)
Sorry guys idk how to do it in an excel way. I can show you in for example in a Java or C way.
if(A2=="Pier" || A2=="Gian")
=IFERROR(LEFT(A2,FIND(" ",A2)-1),A2) \\the excel formula that deletes every second/third name if the cell
if formula in excel that checks a condition and if its verified it proceeds to use another excel formula
You could try the following as per your Excel Versions
• Formula used in cell B2
=IF(OR(TEXTBEFORE(A2&" "," ")={"Pier","Gian"}),A2,TEXTBEFORE(A2&" "," "))
Or, in cell C2
=IF(OR(LEFT(A2&" ",FIND(" ",A2&" ")-1)={"Pier","Gian"}),A2,LEFT(A2&" ",FIND(" ",A2&" ")-1))
Just adding the use of LET() which makes it simpler,
• Formula used in cell B2
=LET(x,TEXTBEFORE(A2&" "," "),IF(OR(x={"Pier","Gian"}),A2,x))
Or, Formula used in cell C2
=LET(x,LEFT(A2&" ",FIND(" ",A2&" ")-1),IF(OR(x={"Pier","Gian"}),A2,x))
Using MAP() to Spill as one dynamic array formula but the logic remains same.
• Formula used in cell D2
=MAP(A2:A6,LAMBDA(m,
LET(x,TEXTBEFORE(m&" "," "),
IF(OR(x={"Pier","Gian"}),m,x))))
you have to use the AND(...) and OR(..) for chaining logical conditions.
Here's an example
I have a formula that pulls data from PivotTable and sums up according to ID:
=SUM(GETPIVOTDATA("Value",$A$3,"AccounID",{5637855, 6839652, 5839670}))
I would like to use the same formula but with a reference:
=SUM(GETPIVOTDATA("Value",$A$3,"AccounID",A1))
When A1 is: 5637855, 6839652, 5839670.
In this case if there is one ID or 10 IDs - it will be the same formula and I can only add an ID in the cell A1.
I am sure that it is possible somehow with Macro, but I want a simple way (since macros in my company are restricted).
I found a few workarounds with SUMPRODUCT and range of cells, but this solution is not practical in my case.
Use this array formula
=SUM(IFERROR(GETPIVOTDATA("Value",$A$3,"AccounID",TRIM(MID(SUBSTITUTE($A$1,",",REPT(" ",99)),(ROW($A$1:INDEX(A:A,LEN($A$1)-LEN(SUBSTITUTE($A$1,",",""))+1))-1)*99+1,99))),0))
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.
All the A1 refer to the cell in which the string is found, EXCEPT the first one in the ROW argument. Leave that as A1 change all the others to the cell in which the string can be found.
Try this:
Option2:
if someone doesn't have the cell A1 restriction`
Create a table (use format as table) with the IDs you want to sum:
[criteria]
| 5637855|
| 6839652|
| 5839670|
Then replace in your formula with the range from your table criteria like:
=SUM(GETPIVOTDATA("Value",$D$1,"AccounID",Table1[criteria]))
and activate the formula as an array with Ctrl+Alt+Enter or Ctrl+Shift+Enter depending your Excel version.
If you highlight Table1[criteria] in the formula and press F9 you will see that the value it is getting is {5637855, 6839652, 5839670}.
I am trying to use a sumif where the criteria is that column B equals 1 or 11:
=SUMIFS(A:A,B:B,{1,11})
The formula above works perfectly. But now what I would like to do is store {1,11} in a cell (e.g. cell C1). Then:
=SUMIFS(A:A,B:B,C1)
This no longer works, and it seems to pull up C1 as "{1,11}". Even though there are no visible quotes in cell C1, when I highlight C1 and press F9 in the sumif formula, quotes do come up.
Is there any way to do this? I want to be able to set the array {1,11} as a variable in a separate cell, because this could change. I do not want it hardcoded within the sumifs formula.
Thanks!!
Place your desired lookup in C1 and down, this is dynamic
=SUMPRODUCT(SUMIFS(A:A,B:B,C1:INDEX(C:C,MATCH(1E+99,C:C))))
Just make sure there are no other numbers in column C and the list is contiguous.
One possibility is you can use text in C1:
'{1,11}
And then define a name to convert it to an array:
EvalC1 refers to
=EVALUATE($C$1)
Note you can use the name in your array formula:
=SUMIFS(A:A,B:B,EvalC1)
I would like to enter information in a cell based on the text contained in a different cell. Specifically, if a cell in column A contains text that includes "insurance," "retirement," or "401K," then I want to place an "x" in its respective cell in Column B. If not, then cell B1 should be empty. The text needs to be contained within the cell, but does not need to be the exact text. E.g., an "x" would still be placed in the column next to "life insurance" or "insurance," "whole life insurance," etc.
E.g.,
Column A Column B
Life Insurance x
Securities
Retirement x
I tried to use the following formula, but am getting an error message when I do so:
IF(OR(ISNUMBER(SEARCH("insurance",A1,"retirement",A1, "401K",A1)),"x", "")
Any thoughts?
This formula should help:
=IF(OR(ISNUMBER(FIND("Insurance",A1)),ISNUMBER(FIND("Retirement",A1)),ISNUMBER(FIND("401K",A1))),"x","")
EDIT:
I came up with an array formula that I like a little better. Hope this helps:
=IF(COUNT(MATCH({"*Insurance*","*Retirement*","*401K*"},A1,0))>0,"x","")
This will require pressing CTRL + SHIFT + ENTER instead of just ENTER after putting it in the cell because it's an array formula.
I need to use an ID in a URL hyperlink like this example:
http://www.wotnots.co.uk/property/images/property2402_image1.jpg
The ID here is 2402. I want to change it to the ID number which is in the first column and is different on every row. I want to have the ID number to be the same as the number in the hyperlink.
I would use the HYPERLINK cell function to generate the link. For example:
Cell A2: 2402
Cell B2: =HYPERLINK("http://www. ... /property" & A2 & "_image1.jpg","Click to see ...")
You can then copy the formula into all of the following rows, and the reference to cell A2 will change to be relative to the current row.
This can also be generated dynamically using VBA code if necessary.
Here you go.
=Concatenate("http://www.wotnots.co.uk/property/images/property",$A1,"_image1.jpg ")
Try the following formula:
="http://www.wotnots.co.uk/property/images/property"&A1&"_image1.jpg"