Consulting

Results 1 to 2 of 2

Thread: Transfer the values from one sheet to another by adding them to below of previous row

  1. #1
    VBAX Newbie
    Joined
    Jun 2020
    Posts
    3
    Location

    Question Transfer the values from one sheet to another by adding them to below of previous row

    Hi everyone,
    I am working on a stock traking system. I have 2 sheets one of them is include all order information and other one include multiple order infotmation. I tried to copy all filled row between A and I column in multiple order sheet and paste them to the first sheet which is include all order information with a help of a button (button is in a form) but the main problem is everytime the user click the button the code needs to scan all rows and start printing from the empty line. I added my failed code on the below.
    sipkalem= multiple order sheet
    sayfa4= all order information

    Dim lR As Integer
        lR = Worksheets("sipkalem").Cells(Rows.count, 1).End(xlUp).Row
     
    For l = 2 To lR
       For i = 1 To 9
        If Worksheets("sipkalem").Cells(l, 4).Value <> "" Then
             With Sheets("Sayfa4")
             l = .Range("A65536").End(3).Row + 1
               If Worksheets("Sayfa4").Cells(l, i).Value = "" Then
                   Worksheets("Sayfa4").Cells(l, i).Value = Worksheets("sipkalem").Cells(l, i).Value
               End If
              End With
        End If
        Next
     Next l
    Sheets("sipkalem").Range("A2:L30").ClearContents
    Thanks for your help

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    With Worksheets("sipkalem").Range(Cells(2, "A"). Cells(Rows.Count, "A").End(xlUp).Offset(, 8)
       If .Cells(4).Value <> "" Then
          .Copy Sheets("Sayfa4").Cells(Rows.Count, "A").End(xlUp).Offset(1)
       End If
       .ClearContents
    End With
    With the entire table
    IF Cell # 4 is Empty
    Copy the entire table to the first empty Row(s) in the other sheet
    Clear Contents of the entire table
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Tags for this Thread

Posting Permissions

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