How do I filldown an array using VBA? Or copy and paste one?

9tanstaafl9

Well-known Member
Joined
Mar 23, 2008
Messages
535
I need to use VBA to either filldown or copy and paste a cell that contains an array. I have to admit, I don't even know what an array is, I'm trying to clean up someone else's report. (Never again!)

Anyway, when I try to use VBA to filldown, or to copy and paste, it "works" fine and pastes the EXACT SAME array, but it does not adjust the row numbers like a normal filldown or copy paste would.

Could someone tell me how to do that, or if it is even possible. I've tried searching but I'm finding answers to different questions.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Do you mean an array formula?
 
Upvote 0
I guess I do. It looks like a normal formula but it has curly brackets. But I realized this morning that my question was dumb. A different array does Fill down quite nicely in an earlier part of the macro. I assumed that the array formula was the root of my problem simply because I wasn't familiar with them. Please disregard my question. And if there is a way to get rid of embarrassing posts altogether please let me know. Thanks!
 
Upvote 0
I figured out my issue. I needed to calculate before proceeding with the rest of the macro. I had copied the cell with the array formula and pasted it into another cell, then immediately grabbed the pasted cell's value as a variable to use somewhere else. I was getting the pre-calculated value, which happened to be zero, and I had mistakenly thought that my copy and paste wasn't working. Sorry for wasting your time, I should've realized that was what was happening.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top