Results 1 to 2 of 2

Adding separate columns data to a new list...and it shifts over all of my existing data?

Threaded View

clvander Adding separate columns data... 08-08-2017, 02:28 PM
mike7952 Re: Adding separate columns... 08-08-2017, 02:58 PM
  1. #1
    Registered User
    Join Date
    08-03-2017
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    4

    Adding separate columns data to a new list...and it shifts over all of my existing data?

    So I have a master list of raw data which is extensive and too much to handle! I extracted only the relevant columns and worked with them, on a new sheet.
    But now I also want to add in 3 additional columns (from the raw data list). I figured I could do this by inserting 3 blank columns in my newer sheet, (I added them in B,C,D) then copy/pasting the data from the old sheet into the new one.
    However, no matter how I've done this, it seems to weirdly shift over ALL of my current data in the new sheet fairly far to the right (see attached pic). Why does it do this? How can I get it just to be copy/pasted into the basic columns I inserted, so that the data is together?

    Note: It works fine when I do it by hand/am recording the macro, but it does the shift-over thing whenever I try to run the macro or use it on other sheets.
    Any help is appreciated. Thanks!

    Sub MacroAddColumnData
    
        Sheets("Line5").Select
        Columns("B:B").Select
        Range("B2").Activate
        Application.CutCopyMode = False
        Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
        Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
        Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
         
        Sheets("Raw Data").Select
        Range("G1").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
        
        Sheets("Line5").Select
        Range("B2").Select
        ActiveSheet.Paste
        
        Sheets("Raw Data").Select
        Range("I1").Select
        Range(Selection, Selection.End(xlDown)).Select
        Application.CutCopyMode = False
        Selection.Copy
        
        Sheets("Line5").Select
        Range("C2").Select
        ActiveSheet.Paste
        
        Sheets("Raw Data").Select
        Range("J1").Select
        Range(Selection, Selection.End(xlDown)).Select
        Application.CutCopyMode = False
        Selection.Copy
        
        Sheets("Line5").Select
        Range("D2").Select
        ActiveSheet.Paste
            
    End Sub
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help with USERFORM adding extra data to an existing list
    By fur in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-13-2014, 08:25 AM
  2. List existing data in a UserForm Textbox and then be able to change the data.
    By gnaske in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-01-2013, 02:01 PM
  3. [SOLVED] adding new data to existing data table in VBA
    By Bonnister in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-21-2012, 10:03 AM
  4. [SOLVED] Data saved to separate sheet overwrites existing data
    By T-2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-19-2012, 01:14 PM
  5. Copying existing comments and data in a list using data validation.
    By labexcel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-03-2012, 05:41 AM
  6. Checking Columns and Adding For Non Existing Data
    By pterodactyl in forum Excel General
    Replies: 12
    Last Post: 09-25-2011, 07:16 AM
  7. adding data to the left/right of existing data
    By lines_michael in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2009, 09:41 AM
  8. Refresh existing data when changed in data validation list
    By problem girl in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-28-2005, 06:05 PM

Tags for this Thread

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