Forecast function to predict future portfolio worth? - google-sheets

Is it possible to fill in D6 to D9 to populate the predicted amount based on the data in A and B in the image below?
Thanks in advance!

Try it:
=TREND(B1:B8,$A$1:$A8,$D$9:$D11)

try:
=ARRAYFORMULA(FORECAST(C1:C8, B1:B8, A1:A8))

Related

How to calculate the difference of numbers in series using Google sheets formula?

I have an inventory sheet, where I need to calculate the difference between the actual value and the series of expected values. Here is a snapshot of what I am talking about:
So for Item1:
Current: 50
Expected: 45,45,45
Now I want to devise a formula that will calculate a difference until the last column in this specific row, something like this:
difference = 50-(45,45,45) //50-45+50-45+50-45 and so on (Q,R..)
difference = 15 //final result
Is there any way that we can achieve this by putting formula in a cell, any help would be much appreciated, thank you.
In google-sheet you can use-
=ArrayFormula(SUM(M2-N2:P2))
In excel use below formula
=SUM(M2-N2:P2)
In case of non 365 version of excel you need to enter it as array means confirm by CTRL+SHIFT+ENTER.

Repeat multiple columns

How to implement multiple column repetition using formulas? Here is my sheet. For example, I need to repeat the range A1:C5 N-times so that the result is like in the range E1:G25. Thanks for the help.
I will try to simplify below formula but it works-
=ArrayFormula(SPLIT(FLATTEN(SPLIT(REPT(ArrayFormula(TEXTJOIN("#";FALSE;"#"&A1:A5&"#"&B1:B5&"#"&C1:C5));5);"#"));"#";;FALSE))
See your sheet
try:
={OFFSET(A1:C;;;COUNTA(A1:A));
OFFSET(A1:C;;;COUNTA(A1:A));
OFFSET(A1:C;;;COUNTA(A1:A));
OFFSET(A1:C;;;COUNTA(A1:A));
OFFSET(A1:C;;;COUNTA(A1:A))}
Another way, number of reps in D1, number of rows and columns in range to be copied can vary:
=ArrayFormula(vlookup(
mod(quotient(sequence(D1*rows(A1:C5),columns(A1:C5),0),columns(A1:C5)),rows(A1:C5))+1,
{row(A1:C5),A1:C5},
mod(sequence(D1*rows(A1:C5),columns(A1:C5),0),columns(A1:C5))+2))
For your locale:
=ArrayFormula(vlookup(
mod(quotient(sequence(P1*rows(A1:C5);columns(A1:C5);0);columns(A1:C5));rows(A1:C5))+1;
{row(A1:C5)\A1:C5};
mod(sequence(P1*rows(A1:C5);columns(A1:C5);0);columns(A1:C5))+2))

How to find out sum of multiplication of 2 column based on value of a third column?

Silly Q, plz help
I am trying to find of Total invested amount for open positions in my PF. which is like
sum( if(G3="","",D3xE3)+if(G4="","",D4xE4)+..+.........)
How to write a formula for the same.
Thanks.
Try SUMPRODUCT() like-
=SUMPRODUCT(D3:D100,E3:E100,G3:G100="")

How to ignore text/strings in google sheet Sum calculation?

If I have a Text in a sum calculation which I would like to ignore. On the picture below you can see my formula. The text OFF is throwing an error on total hours for me. Any help is appreciated.
Your SUM function is pointless the way you have written it as you're already calculating the result with + and - operators (which is why you get the error). Try:
=SUM(C4,E4,G4,I4,K4,M4,O4)-SUM(B4,D4,F4,H4,J4,L4,N4)
Another approach:
=SUMIF(B3:O3,"End",B4:O4)-SUMIF(B3:O3,"Start",B4:O4)

Formula to divide count if

Good day,
I have a countif(concatenate)) and another countif(concatenate). I am looking for a formula that takes the first countif total and the second countif total and dividing the answer of the two.
Help would much appreciated.
Thanks.
From the tag i suggest that you use Excel 2010. Let us assume that you already got the value of countif(concatenate1) in a cell called A1 and the value of countif(concatenate2) in a cell called A2.
A formula to divide A1 by A2 and store the result in A3 would be:
=A1/A2 (place this code in cell A3).
You might want to look into this, too: https://support.office.com/en-us/article/COUNTIF-function-e0de10c6-f885-4e71-abb4-1f464816df34

Resources