Excel - identify due date based on multiple frequencies of given dates - excel

I have table of frequency with amount:
name start_date end_date frequency(M) Amount
A 11 Nov 22 11 Nov 23 6 220
B 15 Nov 22 23 Jun 23 3 500
and a date table. Is there anyway using Excel formulas to identify due dates of these frequencies and sum up all due amounts, like:
Date Amount
10 May 23 0
11 May 23 220
12 May 23 0
13 May 23 0
14 May 23 0
15 May 23 500
Thank you very much.

u can calculate the dates in the same row. the first date calculated would be referring to the start date and every subsequent dates to be calculated would be based on the previous date calculated
so, if your above first table is put in cells from A1 to E3,
the formula in cell F2 should read as: =IFERROR(IF(EDATE($B2,$D2)>$C2,"",EDATE($B2,$D2)),"")
and formula in cell G2 should be: =IFERROR(IF(EDATE(F2,$D2)>$C2,"",EDATE(F2,$D2)),"")
you will next need to pull formula in cell G2 towards right
and copy and paste formula in row 2 in row 3 onwards
to get sum of all the due amount you may next do a sumproduct function of the dates in formula and the amount column

Related

How to calculate averages IDs in Excel

I have the following data
A B
ID Time
22 00:20
33 00:30
60 01:30
41 00:20
41 00:30
33 01:00
22 01:00
Column A= Id and column B= Time
I want to calculate the average time for IDs and get the following table in Excel
I struggled to do it
C D
ID Time
22 40
33 45
60 90
41 25
Make sure you are using the right formula and have the number format as general.
If you have the unique IDs in column C, and want the average on column D, and row 1 has the titles, you could use this formula in cell D2:
=averageifs(b$1:b$1000, a$1:a$1000, d2)
It means "Average the number in column B if what is in column A matches D2".
Fill down the formula.
Then select column D, press Ctrl-1 (with the numbers on top of the letters) to go to format, and in "General" type [mm].
AVERAGEIF is enough:
=AVERAGEIF(A:A;D2;B:B)
Cell format [mm]

Lookup using multiple columns and values

I have a sheet filled with data like below:
Gender MS Age Value
Male Married 21 1
22 2
23 3
24 4
Male Single 21 5
22 6
23 7
24 8
Female Married 21 9
22 10
23 11
24 12
Now there's this other sheet where the user will only be inputting the column "Gender", "MS", and "Age" values and the excel formula should be fetching the associated factor. Please help me with one such formula.
For e.g. If the user puts Male, Single and 23, the formula should return 7.
Here is an example on your sample data:
Formula in G4:
=INDEX(D1:D13,MATCH(1,(ROW(C1:C13)>=MATCH(1,(A1:A13=G1)*(B1:B13=G2),0))*(C1:C13=G3),0))
Enter through CtrlShiftEnter
You can use an array formula for this. I am assuming the blank data under Gender and MS are filled in.
=INDEX(Sheet1!A:D,MATCH(1,(Sheet2!A2=Sheet1!A:A)*(Sheet2!B2=Sheet1!B:B)*(Sheet2!C2=Sheet1!C:C),0),4)
After entering the formula, don't press enter! It is Ctrl+Shift+Enter to make this an array formula.
The formula given compares the values in cells A2, B2 and C2 of Sheet2 with the data held in columns A to D of Sheet1, and outputs the value of the fourth column of the appropriate row.

Excel Averageifs with date criteria

I have 2 sheets called sheet1 and the other sheet2.
Info found on sheet1
Using columns a-d
Date Product qty used actual qty used
1-jan-16 aaaa 102 50
8-jan-16 aaaa 102 150
Date = 1 jan + 8 day till dec 31
sheet2 info
using columns a-d
Month count average
Jan
Feb
Mar
The count columns uses the =count function works OK.
But the average gives an error.
This is what I'm trying to do is average out the actual column on sheet 1 using the month criteria on sheet2, so for the month Jan it looks at sheet1 and averages out the 4 week that have the month Jan found in it.
I get #DIV/0! error
=AVERAGEIFS('sheet1'!H157:H208,'sheet1'!B157:B208,">="&Sheet2!A4,'sheet1'!B157:B208,"<="&EOMONTH(Sheet2!A4,0))
If any info missing please feel free to ask.
Thanks
For some reason it doesn't AVERAGEIFS does not like cell referencing against date values (at least for multiple conditions).
Provided that the Months are entered as actual month values formatted as mmm (which I assume based on the formula you provided), this formula works (I tested it against your sample data (extrapolated)):
=AVERAGEIFS('sheet1'!H157:H208,'sheet1'!B157:B208,">="&Date(YEAR(A4),MONTH(A4),1),'sheet1'!B157:B208,"<"&DATE(YEAR(A4),MONTH(A4)+1,1))

add values for a range between reference date minus 6 days in excel

i would like to add the corresponding values of dates with reference to a particular date and -6 days in excel.
For example: reference date is 10th feb 15. I would like to add values under flight time column for dates ranging between 10th feb 15 and previous 6 days.
similarly add values for a reference date and previous 30 days values and 1 year values.
What i wanted was, sum all the flight timings of a particular date in column A. I used the sumifs formula to achieve this.
The formula is =SUMIFS($I$8:$I$1122,$A$8:$A$1122,"<="&C8,$A$8:$A$1122,">="&C8-6)
What it does: Here the reference cell is C8 which is 6th Feb 14
step 1- date range for the calculation is 6th feb 14 minus 6 days
step 2- add the values of column I which correspond to all the dates that fall within 6th feb 14 to 31st jan 14
step 3- indicate the sum in column K
Unfortunately i cannot include any pictures or files to show what i have mentioned due to site limitations.

How can I perform functions on a specified subset of rows?

I want to find the max (min, average, etc.) of a column but only for the subset of rows where another column matches a certain pattern.
For example, here is the data in the sheet named "data":
Date Value
Jan 15
Jan 17
Jan 3
Feb 19
Feb 34
Feb 37
Then in a separate sheet, "reports", I'd like to have:
Jan Feb
Max 17 37
Min 3 19
What function I can put in the cells in the "reports" sheet to get those values?
If it matters, I'm using Gnumeric 1.10.
To achieve:
=max(column b where column a == Jan)
You can use an IF to do that:
=MAX(IF(A2:A7="Jan", B2:B7))
This formula should be entered as an array formula however. In excel, you do this with Ctrl+Shift+Enter.

Resources