Det vil sige hvis kolonne "B:B" på ark1 skal være i kolonne "R:R" Mærker du Kolonne "B:B" Kopier den, Mærk derefter kolonne "R:R" på ark2 og hold CTRL nede og tryk + så rykker den kolonne "R:R" over til kolonne "S:S" og "B:B" Vil så være "R:R"
evt. tomme celler i kolonne A og B kopieres ikke med
Sub tst() Dim a, b, t Sheets("Ark1").Activate a = Cells(65500, 1).End(xlUp).Row: b = Cells(65500, 2).End(xlUp).Row For t = 1 To a If Cells(t, 1) <> "" Then Cells(t, 1).Copy Destination:=Sheets("Ark2").Cells(65500, 2).End(xlUp).Offset(1, 0) Next For t = 1 To b If Cells(t, 2) <> "" Then Cells(t, 2).Copy Destination:=Sheets("Ark2").Cells(65500, 9).End(xlUp).Offset(1, 0) Next End Sub
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.