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

    instead variuos line one line (2000 sr 1)

    i have this sequence of line is possible to use only a line to set entire range from A:AI?

    Sheets("RATE").Range("A" + RIGA1) = Sheets("SERVIZIO").Range("A" + RIGA)
    Sheets("RATE").Range("B" + RIGA1) = Sheets("SERVIZIO").Range("B" + RIGA)
    Sheets("RATE").Range("C" + RIGA1) = Sheets("SERVIZIO").Range("C" + RIGA)
    Sheets("RATE").Range("D" + RIGA1) = Sheets("SERVIZIO").Range("D" + RIGA)
    Sheets("RATE").Range("E" + RIGA1) = Sheets("SERVIZIO").Range("E" + RIGA)
    Sheets("RATE").Range("F" + RIGA1) = Sheets("SERVIZIO").Range("F" + RIGA)
    Sheets("RATE").Range("G" + RIGA1) = Sheets("SERVIZIO").Range("G" + RIGA)
    Sheets("RATE").Range("H" + RIGA1) = Sheets("SERVIZIO").Range("H" + RIGA)
    .....
    Sheets("RATE").Range("AI" + RIGA1) = Sheets("SERVIZIO").Range("AI" + RIGA)

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

    Re: instead variuos line one line (2000 sr 1)

    For example:

    Sheets("SERVIZIO").Range("A" & RIGA & ":AI" & RIGA).Copy _
    Destination:=Sheets("DATA").Range("A" & RIGA & ":AI" & RIGA)

    or

    Dim i As Integer
    For i = 1 to 35 ' column AI is the 35th column
    Sheets("RATE").Cells(RIGA1, i) = Sheets("SERVIZIO").Cells(RIGA, i)
    Next i

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

    Re: instead variuos line one line (2000 sr 1)

    Sure! Tks.

Posting Permissions

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