Get Average of a range - excel

I am trying to get the average of a set of numbers using a table column as the range. For some reason I can't figure this one out.
What I have so far;
=SUMPRODUCT(--(Table1[Incident ID*+]<>""),--(MONTH(Table1[Reported Date+])=MONTH(1)),--(YEAR(Table1[Reported Date+])=A2))
The column I want to get the average for is
Table1[Time Count]

If you want average, use AVERAGEIFS. Why SUMPRODUCT???
But as you need conditions based on calculation from cells, MONTH(Table1[Reported Date+])=MONTH(1) and YEAR(Table1[Reported Date+])=A2, you will have to create one column in your source data to handle this.
Then you can simply use
=AVEREGEIFS(Table1[Time Count], "<>""""", Table1[Incident ID*+], MONTH(1), Table1[Reported Date+_MONTH_COLUMN]), Table1[Reported Date+_YEAR_COLUMN]=A2)
Why are you using --?

Have you tried this yet?
=Average(Table1[Time Count])

Related

Excel - Index/Match to Parse Column Data Until Desired Value Shows

I'm not sure the best way to word this question, but basically I have a big list of different names and IDs that will be visited multiple times with data pulled from a Survey123 form. One of the fields is asking if a part has been repaired, which will be no a maximum of 3 times before turning yes.
I'm using Index/Match to keep track of the dates the visits took place, but if I try it for the repair column it will always just return the first value in the repair column. Is there a way I can have it parse all the repair column values and change the result if it is Yes?
Here is a visual of what I'm trying to achieve, using Index/Match will stop at the first result rather than cycling through.
You may try below formula. If any of visit has Yes in repaired column then it will return Yes or will return No.
=IF(SUMPRODUCT((A3:A5=F3)*(B3:B5=G3)*(D3:D5="Yes"))>0,"Yes","No")
Or you can use XLOOKUP() with Search_Mode option -1 means search last to first order.
=XLOOKUP(1,(A3:A5=F3)*(B3:B5=G3),D3:D5,"",0,-1)
You can use FILTER to achieve this
=FILTER(C2:C4,(A2:A4=F4)*(B2:B4=G4)*(C2:C4="Yes"),"No")

Counting pairs in a table, excel

I have a table consisting of character names in excel
Small section of table:
I'm looking to count the number of times a pair occurs in a row. eg the number of times yasuo and atroxx appear (3) or the amount of times zoe and zed appear (2) I've tried countifs() but that doesn't work and am looking for any suggestions
For long table it would be easier to solve the issue if you have Excel-365. Try below formula with Excel-365.
=SUM(MMULT(--(A2:E7="aatrox"),SEQUENCE(COLUMNS(A2:E2),,,0))*(MMULT(--(A2:E7="yasuo"),SEQUENCE(COLUMNS(A2:E2),,,0))))
For older versions of excel try-
=SUM(MMULT(--(A2:E7="aatrox"),TRANSPOSE({1,1,1,1,1}))*(MMULT(--(A2:E7="yasuo"),TRANSPOSE({1,1,1,1,1}))))
I think you can transform this question to 3 steps:
you count/countif wheather the name in each row;
you calculate weather the numbers of each target name appears are bigger than 1;
finally, sum the 0/1 result and you get the answer;

SUMIF with Index and multiple match criteria with Dynamic range

enter image description here
In the above problem, I am trying to create a dashboard of Brands Category wise.
The formula i am trying is. THis is in google sheets.
=INDEX($A$1:$F6,ArrayFormula(MATCH(A$12&B12,$A$1:$A6&$B$1:$B6,0)),Match(to_text(C$11),$A$2:$F$2,0))
THis returns only 1 value . But I would like to get a sum of BrandA, Catgory1 both in Nos and Pcs. How do I go about doing it? Somehow, not able to work with SUMIF. what is best suited?
Actually trying to create a dashboard for Month wise Sales/Purchase data like the link below. Any better way of doing in?
https://docs.google.com/spreadsheets/d/1047uWOrOqkW3L_1hoKh-MaY-O0_CZC0WiqmV8HZqk6o/edit?usp=sharing
Raj, if I understand your question, the following formula might provide the result you want.
=QUERY(Data!A1:F,"select A,B,sum(D),sum(E),sum(F)
where A<>'' group by A,B order by A,B
label sum(D) 'Apr',sum(E) 'May',sum(F) 'June' ",1)
This queries your data, groups it (and sorts) by brand and category (ignoring the Unit type) and sums the values. It also modifies the header text for the three summed columns.

Can I use MINIFS or INDEX/MATCH on two non-contiguous ranges...?

Problem is straightforward, but solution is escaping. Hopefully some master here can provide insight.
I have a big data grid with prices. Those prices are ordered by location (rows) and business name (cols). I need to match the location/row by looking at two criteria (location name and a second column). Once the matching row is found (there will always be a match), I need to get the minimum/lowest price from two ranges within the grid.
The last point is the real challenge. Unlike a normal INDEX or MINIFS scenario, the columns I need to MIN aren't contiguous... for example, I need to know what the MIN value is between I4:J1331 and Q4:U1331. It's not an intersection, it's a contiguous set of values across two different arrays.
You're probably saying "hey, why don't you just reorder your table to make them contiguous"... not an option. I have a lot of data, and this spreadsheet is used for a bunch of other stuff. So, I have to work with the format I have, and that means figuring out how to do a lookup/min across multiple non-contiguous ranges. My latest attempt:
=MINIFS(AND($I$4:$J$1331,$K$4:$P$1331),$B$4:$B$1331,$A2,$E$4:$E$1331,$B2)
Didn't work, but it should make it more clear what I'm trying to do. There has GOT to be an easy way to just tell excel "use these two ranges instead of one".
Thanks,
Rick
Figured it out. For anyone else who's interested, there doesn't seem to be any easy way to just "AND" arrays together for a search (Hello MS, backlog please). So, what I did instead was to just create multiple INDEX/MATCH arrays inside of a MIN function and take the result. Like this:
MIN((INDEX/MATCH ARRAY 1),(INDEX/MATCH ARRAY 2))
They both have identical criteria, the only difference is the set of arrays being indexed in each function. That basically gives me this:
MIN((match array),(match array))
And Min can then pull the lowest value from either.
Not as elegant as I'd like... lots of redundant code, but at least it works.
-rt

Excel 2010 Lookup and Offset

Sorry this is a basic question but will try to explain clearly.
I have two worksheets. One a summary and the other that holds the raw data. In the summary tab in cell A1 I have a drop down with each day dd/mm/yyyy.
What I want to do is to find the same date in the raw data table and then look down a set amount of columns and then look across a set about of rows and return that as my value in the summary sheet.
Been trying but can only get to look down or across a column or row and not both.
I think I didn't get enough sleep last night!
Thanks in advance for any help at all.
Without an exact example to apply this to, I'm guessing what you want is offset match match.
As per the formula on the link, you want:
= OFFSET ( starting point , MATCH ( vertical lookup value, left hand lookup column excluding starting point , 0 ) , MATCH ( horizontal lookup value , top header row excluding starting point , 0 ) )
So, if I'm understanding correctly, you have a dataset that looks a bit like this:
Below the data I have example of items you want to find. This probably isn't the cleanest way to do this, but say you want the "hit" column for Operation 2 on 03/07/1989, then it would be:
=OFFSET(A1,MATCH(A10,A1:A5,0)-1,MATCH(A9,A1:H1,0))
This will return "0.81544".
To get the right data, you'll need to mess about with the - and + at the match formulas, and without seeing your data set it's hard to get you exact examples, I hope it helps though! I had to modify it slightly due to the fact I believe that your top row will include the dates as well as the column headings for each. Going through the linked guide should help you plenty to tailor it to your needs.

Resources