Fill Data Automatically In Cells With Macro
To Sheet1 Worksheet_Change procedure ,we added the following VBA codes to fill columns :
Private Sub Worksheet_Change(ByVal target As Range)
If target.Column >= 2 And target.Column <= 3 Then
Call AsagiDoldur(target)
End Sub
Sub AsagiDoldur(IslemgorenHucre As Range)
Dim Islemde As Boolean
If Islemde = False Then
Islemde = True
If Not IslemgorenHucre.Row = ActiveCell.SpecialCells(xlCellTypeLastCell).Row Then
Range(IslemgorenHucre.Address, Cells(ActiveCell.SpecialCells(xlCellTypeLastCell).Row, IslemgorenHucre.Column).Address).FillDown
End If
Islemde = False
End If
End Sub
If target.Column >= 2 And target.Column <= 3 Then
Call AsagiDoldur(target)
End Sub
Sub AsagiDoldur(IslemgorenHucre As Range)
Dim Islemde As Boolean
If Islemde = False Then
Islemde = True
If Not IslemgorenHucre.Row = ActiveCell.SpecialCells(xlCellTypeLastCell).Row Then
Range(IslemgorenHucre.Address, Cells(ActiveCell.SpecialCells(xlCellTypeLastCell).Row, IslemgorenHucre.Column).Address).FillDown
End If
Islemde = False
End If
End Sub
No comments:
Post a Comment