Copy formulas in a range to a non-fixed array

opislak

Board Regular
Joined
Feb 28, 2017
Messages
68
Hello all,

I would like to copy a number of formulas from a fixed starting point (cell E3) up to an unknown number of columns, and down to an unknown number of lines.
If it were not in VBA, these would be the steps to take:
- select cell E3
- press Ctrl-Shift-Right
- copy
- press Ctrl-Shift-Down
- paste formulas

Thanks to Fluff, I was able to determine the number of used columns and rows in a sheet, as follows:
VBA Code:
            usedRows = Range("A:A").Find("*", , , , xlByRows, xlPrevious, , , False).Row
            usedCols = Range("1:1").Find("*", , , , xlByColumns, xlPrevious, , , False).Column
This works fine. Thanks Fluff :)
But how to make the selection?

Thanks in advance.
Patrick, the old guy ;)
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,214,591
Messages
6,120,429
Members
448,961
Latest member
nzskater

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