Conversely, if I were to delete a few columns, it would re-sequence the
columns and still include the formula in all 256 columns on row 1.
"Roger L" wrote:
> Thank you, but if I want to insert a column, can I get it to automatically
> add the formula without having to run a macro? I'm trying to get it to add
> the formula dynamically. Let's say I have the formula in all 256 columns in
> row 1. When I insert a new column (using the standard insert column menu) in
> the sheet, I want it to automatically add the formula, keeping the columns in
> sequence.
>
> "Vergel Adriano" wrote:
>
> > you can put the formula in using VBA. try something like this:
> >
> > ActiveSheet.Range("A1").Formula = "=COLUMN()"
> >
> >
> > --
> > Hope that helps.
> >
> > Vergel Adriano
> >
> >
> > "Roger L" wrote:
> >
> > > I'm trying to use row 1 of a particular worksheet to include the column # in
> > > each and every column of the worksheet. As I add/insert a new column anywear
> > > on the worksheet, it should automatically re-adjust the column numbers
> > > without having to copy or resequence the column numbers (i.e., every single
> > > column should have a formula "=columns()"). Is this possible using VBA code?
> > > If so, can someone please post the code. Thanks in advance for your help.
> > >
> > > Roger
> > >
|