I want to multiply a range by another range in another sheet only If a month in a date from a range matches the month in another range in another sheet.
Technically:
Multiply $R$8:$R$1007 by Start!$L$13:$L$24 If ARRAYFORMULA(TEXT($N$8:$N$1007,"MMMM")),"="&Start!$K$13:$K$24
Edit: here's a sample of my tables:
https://docs.google.com/spreadsheets/d/1A0zZ1BvRnjeQQjsf4RoRGesOPNYOJWzlr9Kh2oYto-Y/edit?usp=sharing
I want the income from US dollars to another currency with conditions.
So in other words column T in sheet Transactions to be equal to the multiplication of the income in US dollars by the exchange rate in column L in sheet Start only If the month from column N equals in sheet Transactions the column K in sheet Start.
How can I right turn this into a functional formula, please?
try:
=ARRAYFORMULA(IFERROR(VLOOKUP(MONTH(N8:N),
{MONTH(Start!K13:K24&1), Start!L13:L24}, 2, )*R8:R))
Based on the limited information of your sheets. The following would multiply and sum each range if the months are matching:
=SUMPRODUCT(--(TEXT(N8:N1007,"mmmm")=Start!K13:K24),R8:R1007,Start!L13:L24)
Related
I have a personal finances Google Sheet with all my expenditures (column A) and corresponding dates (column B) of the month when they are due to be paid.
I would like to create a formula that shows me what is left for the remainder of the month depending on what day of the month I am looking at the sheet.
Something like, ifDate is today, sum all remaining dates of the month expenses.
TIA
Use this formula it works even if the dates is disordered.
=SUMIF(C2:C,">"&F2,B2:B)
Update
=SUMIF(D3:D,">"&TODAY(),C3:C)
I have a sheet with a timeline that shows a month per row in column A and an amount in USD next to that month in column B.
I want to be able to specify amounts in column G with a start and end date for that amount in columns E and F.
What I am trying to achieve is that the values in column B are automatically calculated by looking at the start and end dates specified in columns E and F and then taking the corresponding value from column G if the date in column A falls in between the date range specified in E and F.
I have found many suggestions for similar problems online but wasn't able to get any of them to work for my specific case. Any help is very welcome
You could do it as an array formula like this:
=ArrayFormula(mmult((text(indirect("A2:A"&count(A2:A)+1),"YYMM")>=text(TRANSPOSE(indirect("`E3:E"&count(E3:E)+2)),"YYMM"))*(text(indirect("A2:A"&count(A2:A)+1),"YYMM")<=text(transpose(indirect("F3:F"&count(F3:F)+2)),"YYMM"))*transpose(indirect("G3:G"&count(G3:G)+2)),(INDIRECT("G3:G"&count(G3:G)+2)+2)^0))
The idea is to develop a 2D array where the rows are the months and the columns are the amounts for matching time periods. Then use the standard Mmult method to get the row totals of the array.
Using indirect for the ranges makes the formula longer but using full-column references would be slow as it would result in a nearly 1000 X 1000 array for a default-sized sheet.
EDIT 1
Or shorter
=ArrayFormula(mmult((text(indirect("A2:A"&count(A2:A)+1),"YYMM")>=text(TRANSPOSE(indirect("E3:E"&count(E3:E)+2)),"YYMM"))
*(text(indirect("A2:A"&count(A2:A)+1),"YYMM")<=text(transpose(indirect("F3:F"&count(F3:F)+2)),"YYMM"))
,INDIRECT("G3:G"&count(G3:G)+2)))
because you can combine the row totals step with multiplication by column G.
EDIT 2
Alternatively you could just employ a much simpler pull-down formula using SUMIFS:
=ArrayFormula(sumifs(G$3:G,eomonth(E$3:E,-1)+1,"<="&A2,F$3:F,">="&A2))
This uses Eomonth to change all the start dates to the first of the month so they can be compared to the dates in column A correctly. The formula still has to be entered as an array formula because of the Eomonth calculation.
Note
The equivalent pull-down formula to the original array formulas above would be
=ArrayFormula(sumifs(G$3:G,text(E$3:E,"YYMM"),"<="&text(A2,"YYMM"),text(F$3:F,"YYMM"),">="&text(A2,"YYMM")))
but this gives zero for all rows - the reason for this is not obvious to me at time of writing.
I have a Google Sheets budget spreadsheet that uses SUMIF to calculate bills due between certain days of the month. I have 2 column, E and F, that have the day of the month when the bill is due and the amount due. I'm trying to figure out how to SUMIF the value if the corresponding dates fall between a specified range of days of the month.
I'm assuming this will be a combination of SUMIF and VLOOKUP, but I have no idea how to put this formula together.
I'm expecting the calculated fields to do this: if the date range is from the 4th through the 10th, add up all of the bills due from the 4th through the 10th. Then, for the 11th through 16th, add all the bills due from the 10th through the 16th, etc.
You want to calculate the values in a range where there are two criteria.
Use SUMIFS
sum range = $K$2:$K$24 (note: absolute reference)
criteria range = $I$2:$I$24 (again, absolute reference)
criteria#1 = ">="&B4 - greater than or equal to the start value; note the operators are in quotations and the "START" cell address is added with a "&".
criteria#2 = "<="&C4 - less than or equal to the end value; note the operators are in quotations and the "END" cell address is added with a "&".
=sumifs($K$2:$K$24,$I$2:$I$24,">="&B4,$I$2:$I$24,"<="&C4)
Example
Column B is my monthly sales goal.
Columns E,F,G,H, etc are the number of sales in a given day.
When I meet my monthly goal, Column C will display 100%.
In Column D I would like to display the date asscoiated to the column of the last sale when our monthly sales goal is met.
The equation I have right now for Cell D is:
=IF(C2=100,D=
Try:
=IF(C1=100,"Day Goal Was Met","")
I'm trying to calculate weekly sums in a single column, but I'm having trouble writing the formula. I'm found the the weeknum for every date in the year, but I can't find a way to sum up values if they have the same weeknum.
Link to my spreadsheet: https://docs.google.com/spreadsheets/d/1WIeBpRndO9ZBlkCcWQuNO1X4e9I6bGeQiYDTZqhaOeA/edit#gid=0
I'd like column "D" to automatically calculate the weekly sum using an array formula -- is there a way to do this?
This thread introduces the problem: Calculate weekly and monthly total in spreadsheet.
Chang sum() to sumif()
=ARRAYFORMULA(IF(ROW(A:A)=1,"Weekly Sum", IF(WEEKDAY(A:A)=7, sumif(C:C,C:C,B:B),)))
You have: A2:A with dates and B2:B with values. So:
F2=arrayformula(if(isblank(A2:A),,weeknum(A2:A)))
G2=if(F2<>F1,sum(iferror(filter(B$2:B,F$2:F=F2),0)),0)
And then copy G2 through G3:G.