+ Reply to Thread
Results 1 to 3 of 3

Copying data to specific columns

  1. #1
    Registered User
    Join Date
    05-26-2005
    Posts
    56

    Question Copying data to specific columns

    I have written a script that copies data from an input table into a specific sheet to track information over time. What this macro does is reference the leftmost column in the table and move as far as it can 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 onto the next column and this shouldnt happen until there is new data. Is there a way i can reference a cell that shows the week number, and moves the cursor along to that particular column?

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Yes you can. But we need more details. Which cell contains the weeknum, which cells in the column contain the weeknum. Your code provided does not work standalone for anyone to test.

    Mangesh

  3. #3
    Registered User
    Join Date
    05-26-2005
    Posts
    56
    The cell that controls the week number will be in a front sheet and the corresponding week numbers in the analysis sheet are running along the top of the table (row B) with the data below it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1