I am using Excel 2003.
I have a table:
Date - Column X - Column Y - Column Z - Age
I want to find the AVERAGE for the numbers in the Age Column where the Date in the Date colum = cell A1
There are hundreds of records - I have tried using INDEX and MATCH but cant get it to work. I only end up with the first matching record.
Any help would be appreciated.
Thanks.
Tom
Please try:
=AVERAGE(IF(X:X=A1,Z:Z))
with Ctrl+Shift+Enter
Tom:
I'm not sure if Excel 2003 has AVERAGEIF(), but if it does, use that. You designate your criteria range, criteria, and average range, and it does the rest.
If Excel 2003 does NOT have AVERAGEIF(), then you could use SUMIF() to get the sum of Ages on a certain date and then divide that by a COUNTIF() that counts the ages that occur on your date.
Hope that helps,
Matt via www.ExcelArchitect.com
Related
It's probably a quick one, but I'm desperate...
How can I put 2 corresponding RIGHT functions into a SUMIF? Or does this need VBA?
The case:
I want the sum of B:B, if any cell of J:J has the same last 4 numbers as A1.
EDIT
Column J shows the date an invoice was payed (e.g. "14. November 2020"). A1 is the headline and includes "Income 2020".
The sum in B14 should show how much money came in in the year the sheet is representing.
SUMIF(RIGHT(J:J;4);RIGHT(A1;4);B:B)
May someone enlighten me?
Thanks a lot!
Thomas
If column J contains true dates, then you can use SUMIFS and DATE:
=SUMIFS(B:B;J:J;">="&DATE(RIGHT($A$1;4);1;1);J:J;"<="&DATE(RIGHT($A$1;4);12;31))
This isn't working because the value in column J is a date. You should use SUMIFS and use a date range.
=SUMIFS(B:B,J:J,">="&DATE(RIGHT(A1,4),1,1),B:B,"<="&DATE(RIGHT(A1,4),12,31))
This seems like it should be pretty simple. I am trying to get the sum of values for everyday in a given month.
I would like the formula in K2 to find the sum of all quantities when the City is Houston and 9/1 is found between the start and end date range in columns E and F. So forth and so on.. I'm just not sure if I could do a SUMIF for multiple criteria with matching the city and then the date being found in the same date range.
Hope this is possible -- thank you!
use SUMIFS()
=SUMIFS($D:$D,$C:$C,SUBSTITUTE(K$1," Total",""),$E:$E,"<=" & $J2,$F:$F,">=" & $J2)
I would like to get help on how to write a formula that would count the values in the last 7 cells of my column.
Is someone can help me on this ?
thanks
Not sure if this is the most optimal solution, however, it should work to sum up the values of the last 7 cells in a given column (in my case, column A):
It assume no blank cells in the list ...
=SUM(OFFSET($A$1,COUNTA(A:A)-1,0,-7,1))
I am a little rusty to say the least and in Excel I would like to create a formula that counts the number of cases that have been closed without a certain stage taking place.
So, the formula would need to count the number of rows where there is a date in column k, but no date in column n (the cell is blank). Any help would be appreciated. I have had a go with COUNTIFS and SUMPRODUCT but I'm not getting anywhere.
Try this
=COUNTIFS(K:K,">0",N:N,"")
that's counting rows where K is greater than zero but N is blank [""]
If you can use another column try this formula, for every row of the column:
=IF(K1>0,1,0)*IF(N1="";1;0)
then you have to sum column values.
Instead of K1>0 you can use two cell for date so you can count cells within a range of date.
For a start try something like:
=SUMPRODUCT((K1:K100<>"")*(N1:N100=""))
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