-
Fototrend
A Microsoft Excel topic célja segítséget kérni és nyújtani Excellel kapcsolatos problémákra.
Kérdés felvetése előtt olvasd el, ha még nem tetted.
Új hozzászólás Aktív témák
-
poffsoft
veterán
válasz
morgusz
#28171
üzenetére
upsz, kis hiba maradt,
az a selection.clear nem kell a vége felé!Sub proba()
Dim lista() As String
Dim i As Long
Dim usor As Long ' last used row in source sheet
Dim lrow As Long ' last row in this sheet
Dim scol As Long ' first column of actual formulas source
Dim ecol As Long ' last column of actual formulas source
lista = Split("Munka1,Munka2,Munka3,Munka4,Munka5,Munka6,Munka7,Munka8,Munka9", ",")
Worksheets(lista(0)).Activate
For i = 1 To UBound(lista)
usor = Worksheets(lista(i)).UsedRange.Rows.Count
scol = ((i - 1) * 4) + 1
ecol = ((i - 1) * 4) + 3
lrow = Range(Cells(3, scol), Cells(Rows.Count, ecol)).End(xlUp).Row
If lrow < 3 Then lrow = 3
ActiveSheet.Range(Cells(3, scol), Cells(lrow, ecol)).Clear
Range(Cells(2, scol), Cells(2, ecol)).Copy Destination:=Range(Cells(3, scol), Cells(usor, ecol))
Next i
End Sub
Új hozzászólás Aktív témák
- iPhone 12 64GB 100% (1év Garancia)
- Lenovo L14 Ryzen 5 4500U Refurbished - Garancia!
- Xiaomi 13 Pro 12/256GB Ceramic Black használt 6 hónap garancia
- Akció! Csak tesztelt! WD Blue SN5000 4TB Nvme SSD! 0 Perc - 0 Írás!
- Apple iPhone 17 256GB Sage használt, újszerű 100% akku (0 ciklus) garancia 2029.02.10-ig
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Fferi50