با سلام و احترام
من سوالی داشتم که اون رو در فایل ضمیمه گذاشتم ممنون میشم اگه جواب بدین
من سوالی داشتم که اون رو در فایل ضمیمه گذاشتم ممنون میشم اگه جواب بدین
=IFERROR(INDEX(A$3:A$15,AGGREGATE(15,6,ROW($1:$15)/($A$3:$A$16<>""),ROW(A1))),"")
Sub CopyData()
Dim lr As Long
lr = Cells(Rows.Count, "B").End(xlUp).Row
Range("A1:F1").Select
Selection.Copy
Range("H1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A2:F" & lr).Select
Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.Copy
Range("H2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
End Sub
Sub CopyData()
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlManual
Dim lr, lr2 As Long
lr = Cells(Rows.Count, "B").End(xlUp).Row
lr2 = WorksheetFunction.Count(Range("A2:A" & lr)) + 3
Range("A2:F" & lr).Select
Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.Copy
Range("wwz1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("wwz1").CurrentRegion.Select
Selection.Copy
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A" & lr2 & ":F650000").Clear
Range("A1").Select
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlAutomatic
End Sub
Sub CopyData()
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlManual
Dim lr, lr2 As Long
lr = Cells(Rows.Count, "B").End(xlUp).Row
lr2 = WorksheetFunction.Count(Range("A2:A" & lr)) + 3
Range("A2:F" & lr).Select
Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.Copy
Range("wwz1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("A:F").Select
Selection.SpecialCells(xlCellTypeConstants, 23).Select
Selection.ClearContents
Range("wwz1").CurrentRegion.Select
Selection.Copy
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlAutomatic
End Sub
Sub CopyData()
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlManual
Dim lr, lr2, i As Long
lr = Cells(Rows.Count, "B").End(xlUp).Row
lr2 = WorksheetFunction.Count(Range("A2:A" & lr)) + 3
For i = 1 To lr2
If ActiveCell.Row = 1 Then
Exit For
Else
Range("A65536").End(xlUp).Select
If (ActiveCell.Offset(-1, 0) = "") Then
If ActiveCell.Row = 1 Then Exit For
ActiveCell.Offset(0, 0).Resize(1, 6).Cut ActiveCell.Offset(-1, 0)
Else
Selection.End(xlUp).Select
If ActiveCell.Row = 1 Then Exit For
ActiveCell.CurrentRegion.Cut
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
End If
End If
Next i
Application.CutCopyMode = False
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlAutomatic
End Sub
کامنت