Fill down formula - if-statement

Is there a way of fill a formula down to the last row dynamically as new lines are added without a script just in the formula in google sheets I need the formula only in the cells with data and not in empty cells so if I have in column B1/B5 1,2,3,4,5 I want in column A1 =B1 and to fill down to row A5 =B5, and only in the first 5 rows and to automatically add the formula in A6 when B6 is filled.

sure, try this in A1 cell:
=ARRAYFORMULA(IF(B1:B<>""; ROW(A1:A); ))
or put there whatever you want:
=ARRAYFORMULA(IF(B1:B<>""; B1:B; ))

Related

Split data in a cell to new columns Openoffice Calc

I am using OpenOffice Calc. I'm taking a data value from another sheet that is formatted like :
value1,value2
In a cell. I need to split that into 2 cells
value1 value2
I can do it with Data->Text to Columns, but I need it to be done automatically when importing it from the other sheet.
A formula to get value1:
=LEFT(A1;FIND(",";A1)-1)
And value2:
=RIGHT(A1;LEN(A1)-FIND(",";A1))
This assumes that there are no other commas.

Sumproduct & arrayformula

I have two sheets, both have rows of data where one row represents a specific date in chronological order.
The sumproduct only needs to be made on the latest date (date in below example is in column A).
I set this up with:
=sum(ARRAYFORMULA((A3:A1000=max(A3:A1000))
So assuming that I need to sumproduct the two sheets on this specific row, I can't seem to figure out how to append the sumproduct formula into the arrayformula base.
The sumproduct is pretty basic. Assuming that row 12 is the latest date, I need Sheet 1 Cell B12 to multiply by Sheet 2 Cell B12, then sheet 1 cell C12 to multiply by Sheet 2 Cell C12 and so on.
sumproduct of whole last row of sheet1 with the same row from sheet2:
=ARRAYFORMULA(SUMPRODUCT(
INDIRECT("Sheet1!"&ADDRESS(MAX(IF(Sheet1!A:A="",,ROW(Sheet1!A:A))), 2)&
":"&MAX(IF(Sheet1!A:A="",,ROW(Sheet1!A:A)))),
INDIRECT("Sheet2!"&ADDRESS(MAX(IF(Sheet1!A:A="",,ROW(Sheet1!A:A))), 2)&
":"&MAX(IF(Sheet1!A:A="",,ROW(Sheet1!A:A))))))

Multiple columns on x-axis in PowerBI

I have a dataset that looks like this
All of A1 - A15 have positive integer values
I want a graph with A1 - A15 on the x-axis and their values on the Y-axis with CN and RN as filters.
I am trying to create a bar chart. What should I be putting in Axis, Value, Tooltips, etc. This is my first time with anything like PowerBI.
If you start with table that looks like this:
You can select columns A1 through A3 and, in the query editor, use Transform > Unpivot Columns to get a table that looks like this:
Once you have it in that form, you can put the Attribute (column names) on the Axis and the Value column in the Value section.
Once you add the CN and RN slicers it should look like this:

Using ArrayFormula for a running total causes a circular reference

See attached Google Sheet for example/sample of my issue. I am trying to use an ARRAYFORMULA() to keep a running total in column C, based on adding the previous row's value in column C with the current row's value in column B. Before I make it an ARRAYFORMULA, it works fine. In column F-H, you can see I tried the array version and get a "circular dependency" error.
The working formula:
=B3+C2 (this is in cell C3)
The non-working formula (with the desired ARRAYFORMULA):
=ArrayFormula(G3:G+H2:H) (this is in cell H3)
My question is, what adjustments can I make to my formula that will allow me to auto-fill this formula down the page as new rows are added (and not populating data for blanks).
Name Days Total Days
Jane 5 6
Tom 2 8
Billy 4 12
Sue 6 18
Sally 1 19
Sample document
=ARRAYFORMULA(IF(B2:B="", ,SUMIF(ROW(B2:B), "<="&ROW(B2:B), B2:B)+1))
demo spreadsheet
if this is what you need ( to always sum total in C column ),
then you don't need arrayformula you can use this simple cell formula (this is C2 formula):
=B2+(If(ISNUMBER(C1), C1, 0))
and spread it down the page, here is the sheet I captured
cheers, kres

take two column data and populate into a third column the highest value

I am trying to get excel to populate data into a 4th column using the values in 3 columns:
So
A B C D
8500 9000 8750 ???
i want a formula that will put the highest value into D
Can anyone assist?
Put this in column D
=MAX(A1, B1, C1)
Add the Formula to the cell D
=MAX ( A1,B1,C1)