Using Index and Match but changing the column when I drag down instead of the row - arrays

I am using this formula to pull the first non 0 value in a column:
{=INDEX(FT!D$16:D$610,MATCH(TRUE,FT!D$16:D$610 >0,0))}
I want to be able to drag down this formula and shift the column. For example, when I drag down, the next formula would be:
{=INDEX(FT!E$16:E$610,MATCH(TRUE,FT!E$16:E$610 >0,0))}
and then:
{=INDEX(FT!F$16:F$610,MATCH(TRUE,FT!F$16:F$610 >0,0))}
Please note that I had to do control-shift-enter when applying these formulas.
I read somewhere that I may need to use offset but I couldn't get it to work.
Thanks!

The showed formula does not take the first non 0 value in a column but the first value which is greater than 0. Even text will be greater than 0. And negative values will be excluded.
But if you have the columns D up to H, then the following will do the same as your formula and is fillable downwards 5 Rows (D up to H).
{=INDEX(FT!$D$16:$H$610,MATCH(TRUE,INDEX(FT!$D$16:$H$610,0,ROW(A1))>0,0),ROW(A1))}
Row(A1) is in the first formula. While filling down it changes to Row(A2), Row(A3), ... which leads to 1, 2, 3, ..., 5 as the column parameter in INDEX.

Related

How to SUM all values of a Filter with a relative end range

How can I SUM the totals (cell below) of each column titled "$ Balance" between the ranges of C1-HD2?
• The column at the end of the range, HD, needs to be flexible for column additions/removals.
It's possible that HLOOKUP isn't even the right function... I haven't found a way to SUM the HLOOKUP function... which only appears to return a specified cell, (e.g. where E1 is "$Balance"):
=HLOOKUP($E$1, $C$1:HD$2, 2, FALSE)
Any ideas?
try:
=SUM(FILTER($C2:HD2; $C$1:HD$1="$ Balance"))
or:
=SUM(FILTER(
INDIRECT(ADDRESS(2, 3)&":"&ADDRESS(2, COLUMN()-1)),
INDIRECT(ADDRESS(1, 3)&":"&ADDRESS(1, COLUMN()-1))="$ Balance"))
if you want to drag down the 2nd formula change two 2 for ROW(A2)

How to get an array that summarizes sometimes repeated negative or positive values, also writing the number of repetitions in a separate column?

I got a list with "Move" (Column C) values.
How to create "Sorted" list (Column E,F) , which repeat number in Column F and write action in Column E as 1, if next value go opposite way from zero;
And summarize 2 or more numbers in Column F, and write action in Column E as 2 or more, if they going together same way from zero;
?
Screenshot shows correct result:
Google Sheets example link:
https://docs.google.com/spreadsheets/d/13WL9pD7glAZxOIhsXq6k-ZG0Z8bbGAmMOhtGrW3mRTA/edit?usp=sharing
Here's what I came up with in cell E1 on the mk.idea tab
=ARRAYFORMULA(array_constrain(query({C2:C\LOOKUP(A2:A;filter({A2:A;1}; sign({C2:C;0})<>sign(n(C:C))))};"select Count(Col2),sum(Col1),Col2 where Col2>1 group by Col2 label Count(Col2)'Sorted',Sum(Col1)''";0);9^9;2))
Does that give you what you're after?

Find MAX value in a range with several Columns and Rows and return the value contained in row 1 and Column C

I get the maximum value with the MAX function (A2) and I would like in the cell written FROM (B4) comes the corresponding value from row 1 that found this maximum value and in the cell written TO (B6) comes the highest corresponding value from Column C.
I tried to use the VLOOKUP function but was unsuccessful because it is not a common vertical return.
Link to Spreadsheet:
https://docs.google.com/spreadsheets/d/1uScFepHOAlscLzbmpGIlvPOKbnAfpiPvwZj7GX3HE9Y/edit#gid=1640450499&range=A1:B6
Use below formula to get column value.
=INDEX(A1:AO1,,ARRAYFORMULA(MAX(IF(TodosOsRanges=MAX(TodosOsRanges),COLUMN(TodosOsRanges)))))
And following formula to get row value.
=INDEX(C1:C101,ARRAYFORMULA(MAX(IF(TodosOsRanges=MAX(TodosOsRanges),ROW(TodosOsRanges)))))
See your sheet. I have edited to your provided sheet also.
alternative:
=ARRAYFORMULA(MAX(IF(TodosOsRanges=MAX(TodosOsRanges),COLUMN(TodosOsRanges)-4)))
=ARRAYFORMULA(MAX(IF(TodosOsRanges=MAX(TodosOsRanges),ROW(TodosOsRanges)-1)))
-4 for an offset of 4 columns = D column is start
-1 for an offset of 1 row = 2nd row is the start

Count consecutive increase values with blank cell in Excel

I have a formula for counting consecutive increase of values in a row range.
It seem to work properly with #N/A values (which I have in my dataset) but I get some issues with the first blank value in a row.
In my example below I should have 3 increases (green cells) for both rows.
Formulas are (they are array formulas, Ctrl + Shift + Enter):
J2: {=SUM(IFERROR(--((C2:H2>B2:G2)=TRUE);0))}
J3: {=SUM(IFERROR(--((C3:H3>B3:G3)=TRUE);0))}
It seems that formula in J3 count D3 as 0 and therefore count an increase from 0 to 0,22.
Use this array formula finishing it with ctrl+shift+enter instead of just enter.
=SUMPRODUCT(IFERROR((C2:H2>B2:G2), 0)*IFERROR(B2:G2<>"", 0))
I think you're right about blank being treated as 0. I suggest dividing your first logical equation (C3:H3>B3:G3)=TRUE by B3:G3<>"", resulting in a divide-by-zero error on blanks:
J3: {=SUM(IFERROR(--((C3:H3>B3:G3)=TRUE / ((B3:G3)<>""));0))}
Does this fix it for you?

Excel: Fill a range of cells with a value or formula depending on only one cell

We have a project on a certain math subject and I am done with the computations and it works just fine. So the task is, let's say you have a system of linear equations of certain number of unknowns, you input the number of unknowns, and fill in the values, and using matrix computations, find all the value of unknowns.
To make this short, I already finished the "find the value of unknowns" along with the computation, I checked it, and it seems fine. I can put 6 as the number of unknowns and it automatically computes the inverse of a 6x6 matrix and it will return the 6 unknown values using Index INDIVIDUALLY.
(Note: We aren't allowed to use VBA or Macros since we haven't discussed that yet.
The problem is, I don't know how to automatically fill a RANGE of cells with a VALUE or A FORMULA based on a SINGLE cell value.
For example, In cell A1, I will input 5 (which indicates the number of unknowns), then upon inputting this and hitting enter, let's say a range of cells A2 to A6 (which is 5 cells) will be automatically filled with incremented letters, like for A2 -> A ; A3 -> B ; ... A6 -> E, of which these letters indicate the 5 unknowns.
PROBLEM 2.
Another follow up question, let's say I input again 5, which again stands for the number of missing values/unknowns, in A1, besides the column of the variables A,B,C,D,E (5 unknowns), I want to automatically fill column B respectively with values from an array.
This is just the same with my first problem but this time, instead of incremented letters, it would be Incremented Index function.
For example: I input 5
*Column A will automatically be filled with the variables/letters
*Column B will automatically be filled with the values from an array that's computed using a formula but is not shown independently on cells.
I already have the formula
INDEX(Formula I created, Row number of the answer from the Formula I created , Column number of the answer from the formula I created)
The answers from the formula I made myself is also an array, an "n" rows and 1 column array. If I put the Index formula on a SINGLE cell, it returns specified row number value from the array that resulted in the computation from my formula
What I want is for example, for 5 unknowns
**A | B**
1|.......5..........................
2|.......A..............Some Value 1
3|.......B..............Some Value 2
4|.......C..............Some Value 3
5|.......D..............Some Value 4
6|.......E..............Some Value 5
Wherein the "Some Value" is the Arrayed Answer from my formula and the "1,2,3,4,5" specifies the row number from that arrayed answer.
This is upon inputting the matrix values, inputting the number of unknowns "n" in A1, and automatically filling a range of cells A2 to A"n" with letters A up to what letter "n" corresponds, and automatically filling a range of Cells B2 to B"n" with my formula but with incremented row number for every row in the Index(Formula, Row number , Column number) function.
Note: I hope there's a way to do this using excel functions only since we haven't discussed VBA or Macros yet so we can't use those, and even If we can, I have no knowledge for that. haha. :D
THANK YOU THANK YOU THANK YOU SO MUCH IN ADVANCED! Cheers. :D
Here's a formula for column A:A (write this in cell A2) and drag down:
=IF(ROW()-1<=$A$1,CHAR(ROW()+63),"")

Resources