Consulting

Results 1 to 3 of 3

Thread: Transferring Data between sheets to main record sheet.

  1. #1

    Transferring Data between sheets to main record sheet.

    I've attached a sample sheet of what i'm working on. I have a daily working sheet and a 'complete' record sheet. Can anyone help me with some vba code to take all the data from the working sheet and place it at the bottom of the 'complete' record sheet?

    Cheers

    sample.xlsx

  2. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    Option Explicit
    
    
    Sub test()
        Dim rngS As Range
        Dim rngD As Range
        
        Set rngS = Sheets("Temp").Range("B5").CurrentRegion
        Set rngS = Intersect(rngS, rngS.Offset(1))
        Set rngD = Sheets("Complete").Range("B" & Rows.Count).End(xlUp).Offset(1)
        
        rngS.Copy
        rngD.PasteSpecial xlPasteValues
        Application.CutCopyMode = False
         
    End Sub

  3. #3
    Thanks, that works well. Is there a way of getting round blank rows? it seems to stop at the first blank row it finds
    Quote Originally Posted by mana View Post
    Option Explicit
    
    
    Sub test()
        Dim rngS As Range
        Dim rngD As Range
        
        Set rngS = Sheets("Temp").Range("B5").CurrentRegion
        Set rngS = Intersect(rngS, rngS.Offset(1))
        Set rngD = Sheets("Complete").Range("B" & Rows.Count).End(xlUp).Offset(1)
        
        rngS.Copy
        rngD.PasteSpecial xlPasteValues
        Application.CutCopyMode = False
         
    End Sub

Posting Permissions

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