View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] ownindra@gmail.com is offline
external usenet poster
 
Posts: 16
Default same function edit vba excel

im try

Sub List1()
Dim ws As Worksheet
Dim i As Long
Dim LRow As Long

'~~ Change this to the relevant sheet
Set ws = Sheets("Sheet1")

With ws
LRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For i = 1 To LRow
.Cells(i, "A").Cells(, 3).Value = _
.Cells(i, "E").Cells(, 3).Value
Next i
End With
End Sub
Sub List2()
Dim ws As Worksheet
Dim i As Long
Dim LRow As Long

'~~ Change this to the relevant sheet
Set ws = Sheets("Sheet1")

With ws
LRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For i = 1 To LRow
.Cells(i, "B").Cells(, 1).Value = _
.Cells(i, "F").Cells(, 1).Value
Next i
End With
End Sub
Sub List3()
Dim ws As Worksheet
Dim i As Long
Dim LRow As Long

'~~ Change this to the relevant sheet
Set ws = Sheets("Sheet1")

With ws
LRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For i = 1 To LRow
.Cells(i, "C").Cells(, 1).Value = _
.Cells(i, "G").Cells(, 1).Value
Next i
End With
End Sub

Sub callList()
Call List1
Call List2
Call List3
End Sub

and same with result

https://i.imgur.com/wo2u67e.jpg