ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying data to specific columns (https://www.excelbanter.com/excel-programming/331019-copying-data-specific-columns.html)

chalky

Copying data to specific columns
 

I have written a script that copies data from an input table into
specific sheet to track information over time. What this macro does i
reference the leftmost column in the table and move as far as it ca
left. Then it offsets one column and copies the data in, as follows:

Sheets("Total").Select
Range("H3").Select
Selection.End(xlToRight).Select
Selection.Offset(0, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False

The problem is that if someone hits the macro twice it will copy ont
the next column and this shouldnt happen until there is new data. I
there a way i can reference a cell that shows the week number, an
moves the cursor along to that particular column

--
chalk
-----------------------------------------------------------------------
chalky's Profile: http://www.excelforum.com/member.php...fo&userid=2375
View this thread: http://www.excelforum.com/showthread.php?threadid=37673


mangesh_yadav[_260_]

Copying data to specific columns
 

Yes you can. But we need more details. Which cell contains the weeknum
which cells in the column contain the weeknum. Your code provided doe
not work standalone for anyone to test.

Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=37673


chalky[_2_]

Copying data to specific columns
 

The cell that controls the week number will be in a front sheet and th
corresponding week numbers in the analysis sheet are running along th
top of the table (row B) with the data below it

--
chalk
-----------------------------------------------------------------------
chalky's Profile: http://www.excelforum.com/member.php...fo&userid=2375
View this thread: http://www.excelforum.com/showthread.php?threadid=37673



All times are GMT +1. The time now is 07:29 PM.

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