D
Dirk Goldgar
Hi, Excel folks -
Given a range containing some cells with constant values and some cells with
formulas, what is the most efficient way to shift only the constant values
left or right by a specified number of columns, leaving formulas and all
formatting in source and target cells unchanged? I'd also want to clear the
values in the cells from which the data has been moved.
What this is all about is a worksheet that contains columns representing
months of data, with the rows representing line items or various subtotals.
I want to advance or retreat the date window by a user-specified number of
months.
I've worked out how to do this by looping through the rows and columns of
the range, but (a) the code is slow, taking about several seconds to
execute, and (b) it seems to me this is not the "Excel" way to do this. I
feel like there ought to be a set of simple range operations to accomplish
it.
Can you advise me, please?
Given a range containing some cells with constant values and some cells with
formulas, what is the most efficient way to shift only the constant values
left or right by a specified number of columns, leaving formulas and all
formatting in source and target cells unchanged? I'd also want to clear the
values in the cells from which the data has been moved.
What this is all about is a worksheet that contains columns representing
months of data, with the rows representing line items or various subtotals.
I want to advance or retreat the date window by a user-specified number of
months.
I've worked out how to do this by looping through the rows and columns of
the range, but (a) the code is slow, taking about several seconds to
execute, and (b) it seems to me this is not the "Excel" way to do this. I
feel like there ought to be a set of simple range operations to accomplish
it.
Can you advise me, please?