Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Seperate Data (Excel 2002)

    Hi

    Attached is workbook which seperates data by creating a new worksheet for each surname, the code was kindly supplied by and subsequenlty revised by Hans.

    I have tried to adapt it so that not only does it bring the headers and data through but also rows 1,2 and 3, but with no success.

    Many Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Seperate Data (Excel 2002)

    The header row (row 4) is copied by the line

    oSrc.Range("A4:EF4").Copy Destination:=oTgt.Range("A1")

    How do you think this should be modified to copy rows 1 through 4 instead of just row 4?

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Seperate Data (Excel 2002)

    Hi Hans

    I think it should be oSrc.Range("A1:EF4").Copy Destination:=oTgt.Range("A1").

    Many thanks for pointing me in the right direction.

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

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