Another avoid the loop trick request - on fast fill (Maybe an Alan trick)

M

marston.gould

Since there was such a wonderfully useful way to round all the items in
a range as they are loaded into an array posted -

I'm wondering if there is a fast was to fill an entire column of values
in an array with a particular value?

In otherwords .....

2 x 2 array....

C1 C2 C3
R1 v1
R2 v1
R3 v1
.. v1
.. .
.. .

Where R is row, C is column and V is the value....
 
M

Myrna Larson

If you are talking about a worksheet range, yes

Range("A1:K398").Value = 3

If you mean a VBA array, no. You need to use a loop or a 3rd party utility.
 
A

Alan Beban

Since there was such a wonderfully useful way to round all the items in
a range as they are loaded into an array posted -

I'm wondering if there is a fast way to fill an entire column of values
in an array with a particular value?

In otherwords .....

2 x 2 array....

C1 C2 C3
R1 v1
R2 v1
R3 v1
. v1
. .
. .

Where R is row, C is column and V is the value....
I agree with Myrna Larson's reply. The following has the functionality
the OP requested, but I have no idea whether it meets the requirement
that it be a "fast way".

Alan Beban
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top