Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Devide block of range... (2000 sr 1)

    i use this line to set a range of column:
    Set rng = Range("A3:AC" & lngMaxRow).SpecialCells(xlCellTypeVisible)
    is possible to devide this range in 2 block similar:

    ("A3:K" & lngMaxRow)&("N3:AC" & lngMaxRow).SpecialCells(xlCellTypeVisible)

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

    Re: Devide block of range... (2000 sr 1)

    Set rng = Union(Range("A3:K" & lngMaxRow),Range("N3:AC" & lngMaxRow)).SpecialCells(xlCellTypeVisible)

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Devide block of range... (2000 sr 1)

    ... work, but when i paste the order of copy not is respected...
    i use this to set the first cell to the copy(work with the old rng) now for me the problem is to copy the first blok from A3 to K and second block from N3 to AC :

    rng.Copy ActiveWorkbook.Sheets(1).Range("A3")

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

    Re: Devide block of range... (2000 sr 1)

    I would use two separate copy statements, one for columns A:K and one for columns N:AC.

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Devide block of range... (2000 sr 1)

    ??????????

    Set rng = Range("A3:K" & lngMaxRow).SpecialCells(xlCellTypeVisible)
    rng.Select
    Set rng1 = Range("N3:AC" & lngMaxRow).SpecialCells(xlCellTypeVisible)
    rng1.Select

    rng.Copy ActiveWorkbook.Sheets(1).Range("A3")
    rng1.Copy ActiveWorkbook.Sheets(1).Range("N3")

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

    Re: Devide block of range... (2000 sr 1)

    You don't need the lines to select the ranges. You could even use

    Range("A3:K" & lngMaxRow).SpecialCells(xlCellTypeVisible).Copy Sheets(1).Range("A3")
    Range("N3:AC" & lngMaxRow).SpecialCells(xlCellTypeVisible).Copy Sheets(1).Range("N3")

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Devide block of range... (2000 sr 1)

    !?!?.....

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

    Re: Devide block of range... (2000 sr 1)

    I don't know. It should work.

  9. #9
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Devide block of range... (2000 sr 1)

    any idea? help...

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

    Re: Devide block of range... (2000 sr 1)

    You could post a stripped down copy of your workbook.

  11. #11
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Devide block of range... (2000 sr 1)


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

    Re: Devide block of range... (2000 sr 1)

    This won't work. Please attach a workbook that we can use, instead of one missing most of what we need.

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

    Re: Devide block of range... (2000 sr 1)

    Sal,

    I don't need a huge workbook. I need a version with complete code, and with all necessary worksheets. The text file you attached earlier in this thread is incomplete, and this workbook is incomplete too, so I cannot test anything.

  14. #14
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Devide block of range... (2000 sr 1)

    http://www4.rapidupload.com/d.php?file=dl&filepath=8961

    Note: TEMPLATE is the destination wbook...

    i ma sorry i have nbilieve sheet TABELLA is a part of wbook

  15. #15
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Devide block of range... (2000 sr 1)

    for test comment all Call to other macro not important for the prob...

Page 1 of 2 12 LastLast

Posting Permissions

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