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:
This works fine. Thanks Fluff
But how to make the selection?
Thanks in advance.
Patrick, the old guy
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
But how to make the selection?
Thanks in advance.
Patrick, the old guy