+ Reply to Thread
Results 1 to 2 of 2

Copying data from a "template spreadsheet" into a log using VBA button

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

    Copying data from a "template spreadsheet" into a log using VBA button

    I have a excel file in which one of the sheets will be a user input template. I have attached the file and under the "Input" sheet, all the areas in yellow is where a user would input the information they wanted. I would like to create a VBA/Macro button that would copy information from the "Input" sheet and create a log into the "Data Log" sheet. The "input" sheet will be used several times, so the VBA will have to recognize that information had previously been copied into rows and use the next rows down on the "Data Log". The extent of my knowledge of VBA/Marcros is pretty much limited to recording Marcros. If anyone could help me out or point me in the right direction, it would be greatly appreciated!
    Attached Files Attached Files

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

    Re: Copying data from a "template spreadsheet" into a log using VBA button

    I have the following Macro recorded and a button for it. I just need to figure out how to have the macro paste the information again on the next row in the "Data Log" sheet if the macro is read again. Please help!

    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

+ 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