Hi all,
It would be great if somebody could help out with writing a dynamic array formula that:
- takes a dynamic array as input
- compares each cell's value to the value right beneath it and returns true/false depending if the value matches or not
For instance, if I've got a dynamic array, i.e. I never know how many rows there will be (column count is fixed though) in A1#:
3 | 8 | 6 | 2 |
5 | 2 | 5 | 4 |
6 | 5 | 5 | 7 |
I'd like to get back also a dynamic array:
FALSE | FALSE | FALSE | FALSE |
FALSE | FALSE | TRUE | FALSE |
The trick (for me anyway) is the changing number of rows in the source array - I tried the byrow or bycolumn but once I start putting lambdas in there and passing arrays as arguments - all I get is calc error.
Anybody?
Here's one way to do it:
=LET(data,A1#,MAKEARRAY(ROWS(data)-1,COLUMNS(data),LAMBDA(r,c,INDEX(data,r,c)=INDEX(data,r+1,c))))
Another option
=DROP(A1#,-1)=DROP(A1#,1)
Velouria - this was along the way I was trying to solve it - but failed where you did not - great!
Janset - words fail me - it's unbelievable how simple it was all along!!
Thanks you so much!!!!