ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   macro help (https://www.excelbanter.com/excel-discussion-misc-queries/212183-macro-help.html)

Roy Gudgeon[_2_]

macro help
 
I am attempting to write a macro that copies and adds 6 columns of
information,that are essentially a blank templete, to the end of data that
already exists in the spreadsheet. Further data is then added to the newly
copied template and saved and a new blank template needs to be added.

The issue i have is that when writing the macro the column number where I
want to paste the new cells will always have old data in that would be over
written.

I want the macro to look for the first blank column and paste the new
template here, is that possible ?

thanks
Roy
--
thanks
Roy

Clifford

macro help
 
Hope this helps.

PasteCol =Thisworkbook.Sheets(?).Usedrange.Columns.Count + 1
Thisworkbook.Sheets(?).Cells(1, PasteCol).Paste

--
Clifford Roy


"Roy Gudgeon" wrote:

I am attempting to write a macro that copies and adds 6 columns of
information,that are essentially a blank templete, to the end of data that
already exists in the spreadsheet. Further data is then added to the newly
copied template and saved and a new blank template needs to be added.

The issue i have is that when writing the macro the column number where I
want to paste the new cells will always have old data in that would be over
written.

I want the macro to look for the first blank column and paste the new
template here, is that possible ?

thanks
Roy
--
thanks
Roy



All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com