I'm trying to recall a post I saw a few months ago that failed to show up in my searches. In it the poster used a formula to set multiple values without a loop. Something like
So that you would get
I know one possible way to do this would be
But I think I remember the values being constants rather than formulas.
So how do I assign an array of values to an range without a loop? or maybe a particular formula that can be evaluated right away, but all in a single line of code?
Thanks,
~Gold Fish
Code:
Range("A1:A5") = Something
Code:
Column A
1
0
1
0
1
Code:
Range("A1:A5").Formula = "=Mod(ROW(),2)"
So how do I assign an array of values to an range without a loop? or maybe a particular formula that can be evaluated right away, but all in a single line of code?
Thanks,
~Gold Fish