I've seen a lot of similar questions on here, but nothing that answers what I'm specifically after.
I have a bunch of columns of contact information. Column A has the date of contact (i.e 01/11/2019). Column B has the call start time (ie. 13:42). Column D has the call end time (i.e 13:58).
I want to work out the average minutes of a call for a specific date. So to get average time spent on a call on 01/11/2019, I need a formula that searches for all instances of 01/11/2019 in column A, then for each instance get the time in column D minus the time in column B, then give me an average for all of these.
So far I have:
=AVERAGEIFS(A:A,"01/11/2019",(=D:D-B:B),>0))
Which I assumed would give me an average if column A has 01/11/19, and the result of column D minus column B is more than 0. But it doesn't.
Please help!
You can't incorporate an array of values into AVERAGEIF, nor AVERAGEIFS as they expect Ranges. However, you could re-create AVERAGEIF quite easily:
So the formula in G2 to re-create AVERAGEIF could be:
=AVERAGE(IF(A2:A5=G1,D2:D5-B2:B5))
Note: This formula is an array formula and needs to be
confirmed through
CtrlShiftEnter.
Effectively this is an array (heavy on calculation, and if you wouldn't want to enter it as such, you could replace it with:
=SUMPRODUCT((A2:A5=G1)*(D2:D5-B2:B5))/COUNTIF(A2:A5,G1)
Note: Column C is hidden in this example.
Column A contains Date, Column B Start Time , column C End Time, COlumn D ( Start time - End time) , Use formula>> SUMIFS($D$2:$D$8,$A$2:$A$8,$H$3)/COUNTIF($A$2:$A$8,H3) where H3 is the date
Related
Trying to figure out how to use an array formula to index a transaction list and sum the found numbers within a set date range.
I.e. meal card was used 15 times this month. Need those amounts summed.
I was thinking of an existing formula that searches for the first amount given a certain text match, if only the dates are within A1 and B1 (i.e. 7/1/18, 7/31/18). Next cell searches for the 2nd occurrence, etc.
=IFERROR(INDEX([Transactions.xlsx]Transactions!$D$2:$D$9000,SMALL(IF(([Transactions.xlsx]Transactions!$B$2:$B$9000="GREAT LAKES STUDENT LN ***********0000")+([Transactions.xlsx]Transactions!$A$2:$A$9000>=$A$1)+([Transactions.xlsx]Transactions!$A$2:$A$9000<=$A$2)=3,ROW([Transactions.xlsx]Transactions!$B$2:$B$9000)-ROW(INDEX([Transactions.xlsx]Transactions!$B$2:$B$9000,1,1))+1),1)),"None")
Wasn't sure if this formula could be used for a sum function or if it's a whole different setup.
Just as the formula references, transaction file dates are in column A, description in B, and amount in D
Thank you
I'm new to Excel. I'm looking for formula to perform the following.
Column B has values like TM, LA, Break etc. And Average Handling Time (AHT) will be captured in Column E. Now I need Average AHT for the values in Column B. Ex: If Column B has 6 "TM", then their respective time in Column E should be Averaged. This Avg value will be in Cell G4. Similarly I need Avg AHT time for other values in Column B. Can someone help me in this..
Please Refer to the attached Image above
AVERAGEIF
Use the AVERAGEIF function.
Place the following formula in G4 and copy to the right:
=AVERAGEIF($B$4:$B$15,RIGHT(G$3,2),$E$4:$E$15)
Format G4 and H4 to the desired time format or you will see a decimal number.
Proof of Concept
Explanation:
The AVERAGEIF function has three arguments
=AVERAGEIF(A, B, C)
A: Range of cells that has you criteria in it
B: What your criteria is
C: Range of cells to take the corresponding average of
In this case A is $B$4:$B$15. The cell addresses have been lock with the $ to prevent them from changing when the formula is copied.
For B we used the RIGHT(G$3,2) formula. This pulled the last two characters from your header above. Only rows in B that match the last two characters of the headers will be used for the average calculation. Alternatively, this could have been hard coded as "TM" or "LA"
For C, the times in the range $E$4:$E$15 were supplied. The values that match were added together and then that sum was divided by the number of matches to get the average.
I am creating a reading list that has the day in column a and the required reading in column b for that day. in column c I write the day the reading is completed.
I want to have a cell display the required reading from the row that has the first blank cell in column c.
I hope this makes sense.
I know I'll have to use indirect, because I have a cell with the required reading from today in another cell using =INDIRECT("B"&MATCH(TODAY(),A:A))
The way I understood your question is:
- You have dates in Column A
- Column B has corresponding readings
- Column C is reading completion date that can be blank
So what you want is the first reading from Column B for dates in Column A which are same as today's date where Column C is blank
If my understanding is correct the following array formula should work for you.
=INDEX($B$2:$B$21,MATCH(1,($A$2:$A$21=TODAY())*($C$2:$C$21=""),0))
This is an array formula you'll have to commit it by pressing Ctrl+Shift+Enter
See the image for reference (rows with matching date in Column A i.e. equal to today's date are highlighted):
This result can also be achieved using your formula with some change as:
=INDIRECT("B"&MATCH(TODAY(),(A1:A21)*(ISBLANK(C1:C21)),0))
Again this is an array formula.
But as #Gary'sStudent mentioned in his answer, its always better to avoid INDIRECT function.
This will give the row containing the first blank in column C:
=MATCH(TRUE,INDEX(ISBLANK(C:C),0,0),0)
So to get the equivalent cell in column B, use:
=INDEX(B:B,MATCH(TRUE,INDEX(ISBLANK(C:C),0,0),0))
Thus we avoid INDIRECT(). See:
Daily Dose
I need a formula that can find the date in a cell next to another that has the first number in the column.
In column A I have dates and in column B onward I have stock prices. The dates goes back to 1990 daily, but not all the stock prices starts there. All of the prices end at 20-05-2015.
For all the stocks, I need to find out how many days they have been traded. I have the end date, but I need to look up the start date.
Therefore, I need a formula that says "Lookup the first cell which is numeric in column B, and take the corresponding cell in column A".
Thank you
You can use an array formula like this, assuming you have up to 1000 rows of data
=INDEX($A1:$A1000,MATCH(TRUE,ISNUMBER(B1:B1000),0))
confirm with CTRL+SHIFT+ENTER
I am working with Microsoft excel 2010. I have different dates like column E1:E19 that are not in specific interval. I want help to find only starts month date and paste them into G column like shown into the figure.
First of, is to say - both K_B and Ibrahim Odeh have valid and good attemps. I just want to add another option, because those options use additional rows or manual tools.
Here is the formula I came up with to solve this as shown in your screenshot - just one column, just the rows with the starting dates:
G1=SUBTOTAL(5,E$1:E$19)
G2=SUBTOTAL(5,OFFSET(E$1:E$19,MATCH(EOMONTH(G1,0),E$1:E$19,1),0,ROWS(E$1:E$19)-MATCH(EOMONTH(G1,0),E$1:E$19,1)))
It is possible to use this for the whole column, like this:
G1=SUBTOTAL(5,E:E)
G2=SUBTOTAL(5,OFFSET(E:E,MATCH(EOMONTH(G1,0),E:E,1),0,ROWS(E:E)-MATCH(EOMONTH(G1,0),E:E,1)))
And now, some explaining:
First, you need a starting point in G1 - so we use SUBTOTAL to get the earliest date in column E, using MIN (which is 5).
Now we work from here, by offsetting the range which we use to calculate our SUBTOTAL, still using MIN (5), to get the beginning of each month.
The trick is OFFSET. The first parameter is out basic range, which we will offset, then we have to determine how many rows to offset, and to not get an error, we use ROWS(basicRange) - rowOffset to always stay in out range.
MATCH is used to determine the necessary offset, by looking for the row of the last listed date of the month from G1 using EOMONTH.
Hope this clears any question.
Edit:
Because I do have to translate this, here is the original:
=TEILERGEBNIS(5;E:E)
=TEILERGEBNIS(5;BEREICH.VERSCHIEBEN(E:E;VERGLEICH(MONATSENDE(G1;0);E:E;1);0;ZEILEN(E:E)-VERGLEICH(MONATSENDE(G1;0);E:E;1)))
as long as your dates columns is sorted as it looks in the example then do the following:
insert a row above row 1 (for use of the formula)
enter a formula in column A in all rows that your table has. The formula reads:
=If(NOT(YEAR($E2)&MONTH($E2)=YEAR($E1)&MONTH($E1), MAX($F$1:$F1)+1, "")
This will add increasing numbers from 1 to the number of months involved only next to the first date in your table for that month.
Then in your table in column G put:
=VLOOKUP(ROW(), A:E, 5)
you can drag this formula down as far as you want. The formula finds the first record in A:E that matches the row number in G (ROW() in G1 returns 1), Then VLOOKUP() will return the value in the 5th column in A:E (which is column E with the date).
The Formula in column A should be to the left of the dates for the VLOOKUP() formula to work.
Alternatively you can put it in a column to the right but then use another formula in stead of VLOOKUP() in column G:
=SUMIF(F:F,ROW(),E:E)
This sums all values in E for rows where the value in F matches the row number of the cell in G.
I think you need to use analysis-toolpak Add-on to perform this task:
check out the following URL if you need to know how to load it:
http://office.microsoft.com/en-us/excel-help/load-the-analysis-toolpak-HP001127724.aspx
Regards