Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49972

Inserting number of rows based on a count of data

$
0
0
Hi,

I have a list of data in column A that changes length. I'm looking for a macro that can insert columns from column O based on twice the count of data in column A.

eg. if there are 5 entries in Column A, I'd like to insert 10 columns from O. I have the macro to insert columns but it needs an exact number.

Columns("O:O").Select
Range(Selection, Selection.Columns(No of columns)).EntireColumn.Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Any help would be great.

Thanks.

Viewing all articles
Browse latest Browse all 49972

Trending Articles