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)
Related
I have created a spreadsheet with the tally function =COUNTIF(E$2:H$41," * "&$A85&" * "), which is working, but now I would like to add an additional column that lists what groups those tallies occur.
For example, say " * "&$A85&" * " is searching for the word Apple in E$2:H$41 and it was found in E17. I would want the title of that row to show. For this case Fruit from cell A17. If there were other rows in which Apple was found, say red, I would like those listed as well.
I have tried using the INDEX command but cannot get the formula to work that way.
Any help is appreciated.
You didn't say which column your title is in, but if were in column D then the formula below should work. if it's in column A then change the start to =INDEX(A2:A41.
=INDEX(A2:A41,MATCH(1,(ISNUMBER(FIND($A85,E2:E41)))+(ISNUMBER(FIND($A85,F2:F41)))+(ISNUMBER(FIND($A85,G2:G41)))+(ISNUMBER(FIND($A85,H2:H41))),0))
It's an array formula so you need to confirm with Ctrl + Shift + Enter
It's an index formula that indexes D2:D41 and then the match has a look at the 4 columns E, F, G, and H with OR (confusingly the + sign denotes or).
Because you wanted to search within the cell using *, I used ISNUMBER(FIND($A85,G2:G41)) which returns the character number if it finds the text.
To return more than 1 title
=IFERROR(INDEX($A$2:$A$41,SMALL(IF((ISNUMBER(FIND($A$85,$E$2:$E$41)))+(ISNUMBER(FIND($A$85,$F$2:$F$41)))+(ISNUMBER(FIND($A$85,$G$2:$G$41)))+(ISNUMBER(FIND($A$85,$H$2:$H$41))),ROW($A$2:$A$41)-1),ROW(1:1)),1),"")
It's also an array formula so don't forget to Ctrl + Shift + Enter to add the curly brackets.
This formula in a single cell will not return multiple results so you need to drag/copy the formula down enough cells to accommodate as many results as you think will be returned.
each formula will be the same except for the part at the end ROW(1:1:) which will change to ROW(2:2:), ROW(3:3:).
I have placed the formula in cells B85 and B86 and below but I would advise against using this formula in an area of a sheet if you are going to insert and delete rows above as this sometimes breaks the ROW(1:1:) references. I normally put a formula like this on a different sheet from the source data.
Please see the image which will show my data and expected output.
Use this formula in C2 cell: It is a array formula, so press Ctrl + Shift + Enter after entering formula.
=IFERROR(INDEX($A$2:$A$15,SMALL(IF($A$2:$A$15<>"",ROW($A$2:$A$15)),ROWS($A$2:$A2))-1),"")
With the release of Excel 365 and Dynamic Arrays, this becomes very simple:
=FILTER(A:A,(ROW(A:A)>1)*(A:A<>""))
ROW(A:A)>1 is used to exclude the header,
A:A<>"" is used to exclude blanks
And if you are concerned about the order in which they appear. Create another column and insert index values from 1 to n (Fill Down - Series). Then:
-sort by fruit
-delete the numbers in index column where there is no fruit (they should be in the bottom)
-sort by index from smallest to largest.
I am a novice excel user so I'll explain this the best I can. I need to track Returns, Returns/Exchanges and who processed each...
Cell column A Contains employee Names
Cell column B is where return information will go
Cell column C is where exchange information will go
In B2 I want a formula that will say, if A11:A300 contains 'Ben', and F11:F300 contains 'return', then E11:E300
Does this make sense?
Thanks in advance!
I can't tell if you're attempting to "count" all instances of "Ben" and "return" and collect the total in B2, or if you want to return the value of E11:E300 in B11:B300 when the condition that each row that containing "Ben" and "return" is met.
If it's the former, the this should do it:
=SUM(($A11:$A300="Ben")*($F11:$F300="return"))
Just enter that formula into cell B2 and hold "Ctrl + Shift" while you hit "Enter." That will create an array formula that will count all instances of "Ben" and "return" for each row. You'll know you did it right if the formula is surrounded by curly braces {}. And, no, you cannot manually add them. You must use the entry combination: Ctrl + Shift + Enter.
If it's the latter, then this should do it:
=IF(AND($A11="Ben", $F11="return"),$E11,"")
You could do this more efficiently with an array formula (as specified above), but it's a bit more complicated and I don't want to confuse you since you're an admitted "novice."
Just enter that formula into cell B11 and then drag and copy it down to the remaining 299 rows. This will return the value of E11:E300 in B11:B300 as you requested in your question.
If it's something other than that, then you need to rephrase your question.
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.
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>