I've tried to figure out multiple ways to do this. It seems like it should be simple enough but I haven't been able to figure out how to select multiple cells to fill them with the same number - without changing a preexisting background color that I have across some cells.
If I do the usual select the cell, drag the corner routine, I end up copying the background color in unintentional ways.
I literally just need the same number (.25) assigned to almost every cell.
CodePudding user response:
try:
=INDEX(SEQUENCE(5; 6; 1; 1)*0.25)
where 5 is row and 6 is column
CodePudding user response:
Use this formula
=ArrayFormula(IF(ISNUMBER(RANDARRAY(COUNTA(A:A),COUNTA(1:1))), 0.25, ""))
Explanation
COUNTA(A:A)
is the number of columns in the range A:A
.
COUNTA(1:1)
is the number of rows in the range 1:1
the "header".
You can replace it with hard coded number
Example: 12
columns and 10
rows.
=ArrayFormula(IF(ISNUMBER(RANDARRAY(12,10)), 0.25, ""))