Results 1 to 6 of 6

Creating a log using a macro assigned button

Threaded View

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    Statesville, NC
    MS-Off Ver
    Excel 2007
    Posts
    5

    Creating a log using a macro assigned button

    I currently have a macro recorded and assigned to a button that completes a simple copy from several different cells on one sheet, named "Input", and pastse them into another sheet, named "Data Log". The recorded macro only pastes the values to the same cells in "Data Log" every time. I need the macro to recognize previously copied and pasted data and paste the values into the next row in the "Data Log". Any advise or help would be greatly appreciated. Below is the recorded macro and the excel file is attached. Thanks!

    Sub Log_Data()
    '
    ' Log_Data Macro
    '

    '
    Range("A2").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C3").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("C5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C4").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("D5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C9").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("E5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("D9").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("F5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C10").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("G5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C13").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("H5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C12").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("I5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C20").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("J5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C21").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("K5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C22").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("L5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("C23").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("M5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("D20").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("N5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("D21").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("O5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("D22").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("P5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Input").Select
    Range("D23").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Data Log").Select
    Range("Q5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Application.CutCopyMode = False
    End Sub
    Attached Files Attached Files

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