I am trying to get Excel to return ReturnNo if 2 conditions are met. So far I have:
=Index(ReturnNo;Match(Name;Name2Array;0)
=Index(ReturnNo;Match(City;City2Array;0)
I donĀ“t know how to combine these 2 formulas so that ReturnNo is only returned if both are true.
Thanks in advance for any advice!
Assuming there are no duplicates, and Name2Array & City2Array are all text, simply do:
=Index(ReturnNo;Match(Name&City;Name2Array&City2Array;0))
This is an array formula; when it is typed you must confirm with CTRL + SHIFT + ENTER instead of just ENTER. Here's some background discussion on array formulas: http://spreadsheets.about.com/od/excelfunctions/ss/2011-03-23-excel-2010-multi-cell-array-formula-sbs-tutorial.htm
Related
If number from first coulmn is found in the second column, it should return that number.
If number from first coulmn is not found in the secound column, it should return closest possible min value
You can use vlookup() like this, BUT you need to sort the values:
In C1 enter the array formula:
=MAX(IF(B:B<=A1,B:B))
and copy downward:
Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key. If this is done correctly, the formula will appear with curly braces around it in the Formula Bar.
NOTE:
Sorting is not required.
Array entry is not required if you are using Excel 365.
Another option is SUMPRODUCT:
=SUMPRODUCT(MAX(--($B$1:$B$12<=A1)*$B$1:$B$12))
It works on Excel 2007 or higher, no need of array entered formula and no need of sorting.
I am trying to do vlookup, but however it is matching only first row and my return value is always at last Column (reason).
=vlookup(H:H,A:F,6,0)
I tried with Match and Index functions, but it's not looking up for values other than first column.
I know the vlookup will not work, but any suggestions?
Try INDEX/AGGREGATE combination:
=INDEX($F$2:$F$6,AGGREGATE(15,6,(1/(H2=$A$2:$E$6))*ROW($F$2:$F$6)-1,1))
Try this shorter formula.
In I2 enter array formula and copied down :
=INDEX(F:F,SUM((IFNA($A$2:$E$6,"")=H2)*ROW($A$2:$E$6)))
This is an array formula and needs to be confirmed by pressing with Ctl + Shift + Enter.
So for this excel file, I need to calculate a percent for one subject which has several rows. With this, I have thus come up with:
=IF(COUNT(SEARCH("b0021",B3:B14)), (SUM(T3:T14))/12, "no")
Column B Column T
b0021 1
b0021 0
...
b0025 1
However, this does not seem to work, as to search that ALL the cells contain this text (right now it looks that at least one cell contains the text, which is not what I want to do if it should be one for the subject).
Any ideas of how I can do this?
Thank you.
You need to edit your cell and press Ctrl + Shift + Enter to make it array formula
Your formula =COUNT(SEARCH("b0021",B3:B14)) would start showing result only if it's in brackets
{=COUNT(SEARCH("b0021",B3:B14))}
In other words just add { } to make it formula array or by pressing Ctrl + Shift + Enter while editing your formula
{=IF(COUNT(SEARCH("b0021",B3:B14)), (SUM(T3:T14))/12, "no")}
It looks from your formula that you would need to use =SUMIFS formula rather than what you have:
=SUMIFS(T3:T14,B3:B14,"b0021")/SUM(T3:T14)
I'm using this formula to search particular text in a cell and does work returning correct value, but is there a way to specify range of cells instead just one?
This works =IF(ISNUMBER(SEARCH("Test",A2)),"Yes","No")
Wanted to see if something like =IF(ISNUMBER(SEARCH("Test",A2:A100)),"Yes","No") is possible?
=IF(SUM(IFERROR(SEARCH("Test",A2:A100),0))>0,"Yes","No")
and then make it an array formula by hitting Ctrl + Shift + Enter
=IF(CountIf(A2:A100,"Test"),"Yes","No")
Update
=IF( SumProduct(A2:A100=B1) ,"Yes","No")
or this array formula ( enter with Ctrl+Shift+Enter )
=IF( A2:A100=B1 ,"Yes","No")
It will not work with wildcard characters and will not work for comparing text to number for example.
Some cells contains time and some of them '#VALUE!', '######' and just text.
I want to sum all cells that contains only time.
Meanwhile I wrote =SUMIF(D13:D43,"<>#VALUE!"), but it works only if the cell contains '#VALUE!'
How I can do this?
Assuming your range is from D2:D8, use the following array formula.
=SUM(IF(ISERROR(D2:D8),"",D2:D8))
To make an array formula press CTRL + SHIFT + ENTER when done writing, instead of just ENTER>