I am wondering if in Excel we have command like ones or range command.
I am using the following command in one of my experiment :
=TTEST(A1:A5, {1,1,1,1,1},2,1)
However, if the iterations of the experiment increase, you have a really big formula. So, Any idea if I can write the formula in a more elegant way so that I donot have to repeat 1 as the number of experiments.
Thanks
IT’s a little ugly, but you can use a little trick with the
ROWfunction to generate a series of ones:The
ROWfunction, when used as an array function, will return a sequence of the row numbers in the reference. So to generate the array1,2,3,4,5you could useTo generate a sequence of
nones just divide that array by itself:To make
na variable, just use theINDIRECTfunction and a cell reference:So your formula would be:
Or, more simply for your case, just divide the range by itself: