Dynamically merge N rows into one row - google-sheets

I am using google sheets and have the following format,
I want to get Col3 from Col1 and Col2. As you can see the spaces after Col1 elements are dynamic and that is why its hard to keep track of how many rows to append.
I would have added some code, but I have no idea where to begin. Kindly give me some direction.

This is difficult to do without a sample spreadsheet but there is a chance that this works if you put it in cell C2 and drag it down column C
=IF(A2="",,TEXTJOIN(", ",TRUE,FILTER(B:B,LOOKUP(ROW(A:A),FILTER(ROW(A:A),A:A<>""))=LOOKUP(ROW(A2),FILTER(ROW(A:A),A:A<>"")))))
Formulas used:
FILTER()
ROW()
TEXTJOIN()
LOOKUP()

Related

Flip table in Google Sheet

I'm looking to flip a table and can't seem to make it work with a combination of array formula and transpose. I'm looking for a formulae that can do this for larger data set
Please see the picture below for details.
enter image description here
Tried array formulas, transpose, pivot table but with no success
use:
=ARRAYFORMULA(QUERY(SPLIT(FLATTEN(A1:C1&"×"&A2:C10); "×");
"where Col2 is not null"; ))

Dynamic formula which Sums the Value if criteria is met

I have been working on sheet where i always apply SUM manual by selecting the each cell separately.
There are multiple sheets where i SUM manually with similar headers that are available in Col"A".
I just want to make SUM formula dynamic.
when it will become dynamic i will drag it from left to right and formula will give SUM result.
I have tried with IF but could not make it and i am sure its not just IF that could make it.
use:
=SUM(FILTER(B5:B, REGEXMATCH($A5:$A, TEXTJOIN("|", 1, $L2:$L))))

Apply VlLOOKUP till last non-empty row in google sheets

I have an automatically expanding google in which I am applying a Vlookup formula to extract values from another sheet matching the values from the main sheet.
This is the Vlookup formula-
=VLOOKUP(A2, IMPORTRANGE("1MNRMKGkC-c0COugUWpXOe5OxJXfmdXGboxAPhf5SaLA", "Sheet1!B3:E420"),4,0)
I want the formula to be auto applied to the new entries which get auto added in the main sheet. I used this formula I found on a website to apply this formula to the whole column also taking care of any empty cells in between.
=ArrayFormula(IF(ISBLANK(A2:A), "", VLOOKUP(A2:A, IMPORTRANGE("1MNRMKGkC-c0COugUWpXOe5OxJXfmdXGboxAPhf5SaLA", "Sheet1!B3:E420"),4,0)))
My problem is that after using this formula when a new entry is auto added to column A in the sheet, it gets added to 1001th row instead of the next non-empty row, because this formula is being applied to whole column.
Is there some way to apply the Vlookup to just be applied till last non-empty row, so that my next automatic entry gets added in the next empty row? Or any other alternative solution?
Thanks for the help!
try:
=ARRAYFORMULA(QUERY(IF(ISBLANK(A2:A),,VLOOKUP(A2:A,
IMPORTRANGE("1MNRMKGkC-c0COugUWpXOe5OxJXfmdXGboxAPhf5SaLA", "Sheet1!B3:E420"), 4, 0)),
"where Col1 is not null", 0))
Since we don't have sheet for reference assuming new data is added to new column.
Try this fromula =ARRAYFORMULA(If(A2:A="","",VLOOKUP(A2:A, IMPORTRANGE("1MNRMKGkC-c0COugUWpXOe5OxJXfmdXGboxAPhf5SaLA", "Sheet1!B3:E420"),4,0)))
This will do vlookup once there is new data in Column 'A'

Drag down the formula of IMPORTRANGE that changes the last value into increment value

I have an IMPORTRANGE formula in Google Sheets and want to apply it in the rest of the cells below. When I drag down the formula, it stays the same:
=importrange("1jhXCPi6RUf8MD7XoYgQsH-E0x768UtVxE3XY_kBrbkE","OCT!F2")
How can I drag a formula and have it automatically increment the value (OCT!F2 should be change into OCT!F3 up to OCT!F118)?
When I drag down this formula, I want it to be like this.
=importrange("1jhXCPi6RUf8MD7XoYgQsH-E0x768UtVxE3XY_kBrbkE","OCT!F3")
You may use row formula:
"OCT!F3" = "OCT!F" & row(A3)
You may also include the range in single importrange:
"OCT!F2:F500"
Be careful: importrange formulas may slow down your sheets.

How do I organize formulas to work with columns in google sheets

Hi so I'm trying to make a spreadsheet in Google Sheets that takes two numbers and subtracts them and then does it in the next row .
So example the formula in C1 would be "subtract(A1, B1)" in the first row. But then in the next row I would like it to change to "subtract(A2, B2)" and output in C2.
(Without having to go in each C cell and change the formula of course)
So how do I do that and also how do I apply a formula to multiple cells of a row (C1,C2,C3,C4,C5, etc....)
Just put =MINUS(A1,B1) into C1 and then copy it and paste it in the remain rows of column C and the spreadsheet automatically adjusts the row numbers for you.
#Cooper's Answer above is perfect. I'm just giving a alternative here using array formulas, because it's easy.
Put this in D2
=ARRAYFORMULA(MINUS ( B2:B, MULTIPLY( 2.5, QUOTIENT(C2:C,15))))

Resources