excel rows,find if include,low and high - excel

it seems that i cant post my picture.here is my link to it:
picture: http://s18.postimg.org/nfv997rvd/head.png
Hello Stackoverflow.
I have some things I wondering about here. I'll try to take it step by step:
It is marked in orange color:
As mentioned in the example in the picture it says "headphones". I would like it to search through all the lines in column A, to find something that has that name in it, then it should count the number of people, and come out with the number (in how many)
the "middle price" I want it to take the price of B (depending on where it found it called headphones) and take the average price of it.
In secured, as I would like it to count how many of them (from the number, or from the beginning) that have "secured" as "no" and "yes."
would like to use this on several things.
pink:
where would I find the average price of all the goods, and what the name of the particular item is.
same with the highest and lowest price.
How can I do this?

to find out how many Headphones:
=COUNTIF(A:A,"*Headphones*")
Note the *'s around the word so it can be found anywhere in the text to make a match.
For middle price there are 2 options, depending on how you want to define the average.
If it's a straight average:
=AVERAGEIF(A:A,"*Headphones*",B:B)
If you want the median, then you will have a slightly more complex formula with
=MEDIAN(IF(A1:A100="*Headphones",B1:B100))
and entered as an array formula with Ctrl+Shift+Enter
maximums and minimums can also be found with the same type of array formula
=MAX(IF(A1:A100="*Headphones",B1:B100))
=MIN(IF(A1:A100="*Headphones",B1:B100))
Excel also has COUNTIFS for multiple criteria:
Secure/Not Secure Headphones:
=COUNTIFS(A:A,"*Headphones*",E:E,"Ja")
=COUNTIFS(A:A,"*Headphones*",E:E,"Nei")

Related

Is there a way I can count a specific string (Product) in a column times by the neighboring cell (Quantity) so show how much of a product I have sold [duplicate]

I'm wondering if there is an easy way to do what I'm looking for. Basically, I have a balance sheet in Excel 2011 with a bunch of data. One specific piece of information I always want visible is the amount that hasn't been reimbursed. In other words, I have a column for the amount paid and another for whether or not it has been reimbursed (Yes/No). I want to sum all of the amounts paid where the reimbursed field is equal to 'No'.
I recognize I can sum the entire column and filter out those that have been reimbursed, but I'd like it to display the full amount regardless of what filter is on (or if no filter is on).
I wasn't able to find good keywords to describe this to Google, so I'm asking here. I would like to accomplish this in Excel, not in an external program or script.
If column A contains the amounts to be reimbursed, and column B contains the "yes/no" indicating whether the reimbursement has been made, then either of the following will work, though the first option is recommended:
=SUMIF(B:B,"No",A:A)
or
=SUMIFS(A:A,B:B,"No")
Here is an example that will display the amounts paid and outstanding for a small set of sample data.
A B C D
Amount Reimbursed? Total Paid: =SUMIF(B:B,"Yes",A:A)
$100 Yes Total Outstanding: =SUMIF(B:B,"No",A:A)
$200 No
$300 No
$400 Yes
$500 No
You could do this using SUMIF. This allows you to SUM a value in a cell IF a value in another cell meets the specified criteria. Here's an example:
- A B
1 100 YES
2 100 YES
3 100 NO
Using the formula: =SUMIF(B1:B3, "YES", A1:A3), you will get the result of 200.
Here's a screenshot of a working example I just did in Excel:
You should be able to use the IF function for that. the syntax is =IF(condition, value_if_true, value_if_false). To add an extra column with only the non-reimbursed amounts, you would use something like:
=IF(B1="No", A1, 0)
and sum that. There's probably a way to include it in a single cell below the column as well, but off the top of my head I can't think of anything simple.

Of the 10 individuals with the highest income, how many are married males?

Question --> Of the 10 individuals with the highest income, how many are married males?
I want to achieve the same in a single function.
Below is a database.
enter image description here
First I fetched data with Large and the applied vlookup and the used counifs to get the count.
enter image description here
enter image description here
You are close.
Why are you using IFERROR? Are there errors in the data or something else?
In the formula below, I used a Table and Structured references. An advantage is that the range references will automatically adjust. You can switch to normal addressing if you prefer.
I would use:
=COUNTIFS(myTable[Income],">="&LARGE(myTable[Income],10),myTable[Sex],"M",myTable[Married],"Yes")
With regard to your formula, you would think you could just SUM the results. Unfortunately, for any instance where there are duplicates (2 married men with same income in the top 10), your formula would return a 2 and not a 1 and the SUM would therefore be incorrect.
You can avoid that, with your approach, by converting any non-zero into a 1:
=SUM(--ISNUMBER(1/(COUNTIFS(myTable[Income],LARGE(myTable[Income],SEQUENCE(10)),myTable[Sex],"M",myTable[Married],"Yes"))))
However, I think my approach is simpler.

In Excel, "if greater than 0 and less then 10 then "x", but if greater then 10 and less then 20 then "y" in same cell

I am trying to create a formula to calculate shipping based on price but I have only been able to find this:
=IF(AND(D2>0.01,D2<13.51),4.51,"")
Basically it reads "If the total purchase (D2) is greater then $0.01 and less then $13.51 apply $4.51 as the shipping fee. This works for the one fee but I need it to apply the other fees as well and I cannot seem to figure out how to do multiple greater than, less than in one formula.
So I need to be able to add multiple of that same code and change the numbers, but I can't figure out how to do multiple without getting an error.
VLOOKUP with approximate match sounds like it would be the easiest if you have a lot of shipping prices. The lookup table is in grey and you can setup however you like. If column 'B', put the formula =VLOOKUP(A2,$D$2:$E$5,2,TRUE) The TRUE is was provides the approximate match.
A nested IF would work, but would be horrible to manage. Using the VLOOKUP, anyone could maintain the lookup table.

Excel - Find highest MULTI-cell Total

Hello!
Is it possible to have Excel find the largest two, three or four cell total within its data? For example, dates are entered as 2000, 2001, 2002, etc in column A and in column B, there's another figure, HRs. I have my document sorted by dates (columnA) and now want to see the most HRs hit over two seasons. This seems very useful and utilized in data but still under-realized.
-Most touchdowns over a two-season stretch. (most touchdowns over a THREE season stretch etc.)
-Highest-grossing 3-month stretch.
-Rainiest two days ever
-Most speeding tickets issued in two days.
-Largest two-day Jeopardy winnings.
-ETC
Can I search through an excel document and see the largest 2-day rainfall as described? Something similar to "Find All" in excel but for consecutive cells, though, that doesn't find largest I suppose. It'd be cool, if you could drag a range, say 3 cells tall, within a larger range, and Excel could find that largest totals in that larger range.
I doubt this is possible---but surely there is a way data scientists or just newspapers can organize data to find the largest total over a certain stretch? (most HR over a 5-season stretch) How could I do this? Maybe this requires a program for SQL or something? Thank you.
https://www.exceltip.com/summing/sum-the-largest-two-numbers-in-range-in-microsoft-excel.html
This seems close, but just finds the two largest figures----not the two largest consecutive figures, which is what I'm looking for.
Using offset ranges:
=MAX(B2:B12+B3:B13)
or subtotal/offset combo:
=MAX(SUBTOTAL(9,OFFSET(B1,ROW(B1:B11),0,2,1)))
(the first one gets cumbersome when extended to 3,4,5... adjacent cells)
must be entered as array formulas using CtrlShiftEnter
EDIT
If you wanted to find the first, second etc. largest pair you could use Large instead of Max:
=LARGE(B$2:B$12+B$3:B$13,ROW()-1)
or
=LARGE(SUBTOTAL(9,OFFSET(B$1,ROW(B$1:B$11),0,2,1)),ROW()-1)
and then to find the year, use Index/match:
=INDEX(A$2:A$12,MATCH(F2,SUBTOTAL(9,OFFSET(B$1,ROW(B$1:B$11),0,2,1)),0))
The only drawback of this is that if there were two pairs giving the same maximum of 84 say, the index/match would still match the year of the first one. This can be addressed but maybe that is enough for now.

Excel Sumif, Sumifs with partial strings in multiple columns?

So this is the simplified question I broke down from a former question I had here: Excel help on combination of Index - match and sumifs? .
For this one, I have Table1 (the black-gray one) with two or more columns for adjustments for various order numbers. See this image below:
What I want to achieve is to have total adjustments for those order numbers that contain the numbers in Total Adjustment column in the blue table, each of which will depend on the cell beside it.
Example: Order number 17051 has two products: 17051A (Apple) and 17051B (Orange).
Now what I want to achieve in cell C10 is the sum of adjustment for both 17051A and 17051B, which will be: Apple Adjustment (5000) + Orange Adjustment (4500) = 9500.
The formula I used below (and in the image) kept giving me error messages, and this happens even before I add the adjustment for Orange.
=SUMIF(Text(LEFT(Table1[Order Number],5),"00000"),text(B10,"00000"),Table1[Apple Adjustment])
I have spent the whole day looking for a solution for this and didn’t even come close to find any. Any suggestion is appreciated.
Assuming your headers always have the text "adjustment" in them, you could use:
=SUMPRODUCT((LEFT($B$4:$B$7,5)=B10&"")*(RIGHT($C$3:$F$3,10)="adjustment")*$C$4:$F$7)
In C10 you could add two sumproducts. This assumes that products are always 5 numbers long at the start. If not swop the 5 to use the length of the product reference part you are matching on.
=SUMPRODUCT(--(1*LEFT($B$4:$B$7,5)=$B10),$D$4:$D$7)+SUMPRODUCT(--(1*LEFT($B$4:$B$7,5)=$B10),$F$4:$F$7)
Which with table syntax is:
=SUMPRODUCT(--(1*LEFT(Table1[Order Number],5)=$B10),Table1[Apple Adjustment])+SUMPRODUCT(--(1*LEFT(Table1[Order Number],5)=$B10),Table1[Orange Adjustment])
Using LEN
=SUMPRODUCT(--(1*LEFT(Table1[Order Number],LEN($B10))=$B10),Table1[Apple Adjustment])+SUMPRODUCT(--(1*LEFT(Table1[Order Number],LEN($B10))=$B10),Table1[Orange Adjustment])
I am multiplying by 1 to ensure Left, 5 becomes numeric.

Resources