Iterate a range within a formula in sheets - google-sheets

I haven't been able to find if there's a 'quick' way to iterate the range of a column. In many formulas you have to have to first select the range of the sheet like
'Data'!A1:C1
I want to know if there's an easy way to iterate the column for the following rows when you drag the formula to the rows below so the formula in the next row is
'Data'!B2:C2
Is it possible? Thanks in advance.

possible:
="Data!"&ADDRESS(ROW(A2), ROW(A2), 4)&":"&ADDRESS(ROW(A2), 3, 4)
do not forget to convert it into actual range by wrapping it into INDIRECT

Try
'Data'!A"&row()&":C"&row()
you could change row()/+- with a corresponded number for the fit you want.

Related

Refer to itself in ARRAYFORMULA

I am just wondering whether it is possible to achieve what I need to achieve, but using an ARRAYFORMULA.
I have a simple setup where in column B I show the value, which is present in the last previous filled in row in column A
Here is an example.
So, the questios is: is it possible to achieve the same, but with ARRAYFORMULA(s), so that in case a new row is incerted, one does not need to drag formula to fill in the new row, but the formula would be added automatically. All my attempts ended up with the circular reference problem.
This is tradtionally done with a vlookup of row numbers into a filtered array of the values. It would look like this in row 4 of your sample sheet:
=ARRAYFORMULA(VLOOKUP(ROW(A4:A),FILTER({ROW(A4:A),A4:A},A4:A<>""),2,TRUE))

Sum two ranges separately in one formula

How can I do one single formula to sum two ranges and display them in their respective column.
Here I'm using SUM formula in each cell but I'm sure there must be a single formula that can accomplish this.
Value 1 and Value 2 are the ranges to add them together in Sum row.
Here is an example picture.
Since arrayformula does not support sum, I suppose you could also do this in C12:
=arrayformula(C10:I10+C11:I11)
Clear the formula you have in row 12 and then enter in C12
=index(mmult({1,1}, --C10:I11))
Change range to suit and see if that helps?

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))))

How to highlight a specific range of cells if none have a value

Apologies in advance if I don't explain this very well, I have only an amateur's interest in formulas.
I have a Google Sheet where I need to fill in a value, in this case, "1" in one column in the range C-J for each row.
I'd like to know the custom formula so that if I haven't filled in a "1" in any row C-J, then the C-J range of that row is highlighted red (but not the whole row)
I've attached screenshots of what it looks like currently and then an example of what I would like it to look like.
Current:
Desired:
use this custom formula:
=SUM($C4:J4)=0
or you can use:
=COUNTIFS($C4,"",$D4,"",$E4,"",$F4,"",$G4,"",$H4,"",$I4,"",$J4,"")
Use Custom Formula
=countif($C2:$J2,1)=0

Using the same formula for each row in sheet

I want for every row in my sheet to calculate a score using a formula. So the same formula for each row. I tried this:
=ARRAYFORMULA(min((((C3:C100)/4)+((K3:K100)*4/10)+(M3:M100)+((N3:N100)/2.5)+((O3:O100)/5)+(R3:R100)+(T3:T100)+((P3:P100)/3)+(V3:V100))/23))
But it does calculate at all, for any row. (I am starting from row 3)
Why does it act like this? Any suggestions?
It's always best to provide us a link to your sheet, so we can see what you're trying to accomplish (or at least create a copy without sensitive data and share that).
If you want the same exact formula for each row, you will get the same exact result with your current formula. Also, do you mean to SUM the range values you have provided inside the formula? If so, you need to alter your formula to look like this:
=ARRAYFORMULA(min((((sum(C3:C100)/4)+(sum(K3:K100)*4/10)+sum(M3:M100)+(sum(N3:N100)/2.5)+(sum(O3:O100)/5)+sum(R3:R100)+sum(T3:T100)+(sum(P3:P100)/3)+SUM(V3:V100))/23)))
Please be more specific about exactly what you want the formula to calculate on each row. If it's on row 20, for example, do you still want rows 3-100 to be considered? Or just rows 20-100? WHAT data do you need to be considered on each row's formula, in other words?
Here's a sheet I created to try to understand what you want:
https://docs.google.com/spreadsheets/d/1GRdU6NLMWx2xPXDNp21VzYRQRj6cjNbL4RGVUV2x8Wk/edit?usp=sharing

Resources