Results 1 to 22 of 22

VBA Code to transfer data from one sheet to another

Threaded View

  1. #1
    Registered User
    Join Date
    01-10-2019
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    12

    VBA Code to transfer data from one sheet to another

    I need help with this

    It only seems to transfer 1 row where as the data I have has numerous rows can somone help with this please.

    Code is below

    rivate Sub CommandButton3_Click()

    Dim TestName As String, StepName As String, Description As String, Expected As String, Actual As String, TestStatus As String, Comments As String
    Worksheets("Test Execution Sheet").Select

    TestName = Range("A2")

    StepName = Range("B2")

    Description = Range("C2")

    Expected = Range("D2")

    Actual = Range("E2")

    TestStatus = Range("F2")

    Comments = Range("G2")

    Worksheets("data").Select
    Worksheets("data").Range("a1").Select
    If Worksheets("data").Range("a1").Offset(1, 0) <> "" Then
    Worksheets("data").Range("a1").End(xlDown).Select

    End If

    ActiveCell.Offset(1, 0).Select
    ActiveCell.Value = TestName
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = StepName
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = Description
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = Expected
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = Actual
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = TestStatus
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = Comments
    Worksheets("Test Execution Sheet").Select


    End Sub

    The data sheet has the same table where no data is present I want the data I submit from Test Execution Sheet to transfer to the data sheet howwever this only seems to transfer one row an not all rows in view within the Test Execution Sheet.
    Attached Files Attached Files
    Last edited by Mick1982; 01-10-2019 at 12:41 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA Code for create Sheet and transfer Data
    By hkbhansali in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-02-2017, 01:24 PM
  2. code that allow transfer data from userform to sheet
    By mazan2010 in forum Excel Programming / VBA / Macros
    Replies: 42
    Last Post: 01-31-2017, 04:55 PM
  3. Require VBA code to Transfer specific data from one sheet to another sheet.
    By xlhelp7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2017, 10:20 AM
  4. Using VBA Code and checkBoxes to transfer data to another sheet
    By carlandtina02 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-26-2012, 05:50 PM
  5. vb code - Automatic transfer of data from one sheet to another
    By herr_bench in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-23-2005, 08:20 PM
  6. vb code - automatic transfer of data from one sheet to another
    By herr_bench in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-23-2005, 06:48 AM
  7. vb code - Automatic transfer of data from one sheet to another
    By herr_bench in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-23-2005, 03:11 AM

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