Comparing and updating sheets.
SUB MACRO_RUN
Call neha1
Call neha2
Call neha4
Call neha5
Call neha6
End Sub
Function neha1()
For B = 2 To 50
For a = 3 To 50
If Worksheets("Activity").Cells(B, 4).Value =
Worksheets("IP_MPLS").Cells(a, 1).Value Then
Worksheets("IP_MPLS").Cells(a, 32).Value =
Worksheets("Activity").Cells(B, 10).Value
Worksheets("IP_MPLS").Cells(a, 21).Value =
Worksheets("Activity").Cells(B, 1).Value
Worksheets("IP_MPLS").Cells(a, 22).Value =
Worksheets("IP_MPLS").Cells(a, 22).Value & ". ;" &
Worksheets("Activity").Cells(B, 2).Value & ";" &
Worksheets("Activity").Cells(B, 8).Value
End If
Next a
Next B
End Function
Function neha2()
B = 2
For B = 2 To 50
For a = 3 To 100
If Worksheets("Activity").Cells(B, 4).Value =
Worksheets("BB").Cells(a, 1).Value Then
Worksheets("BB").Cells(a, 32).Value =
Worksheets("Activity").Cells(B, 10).Value
Worksheets("BB").Cells(a, 21).Value =
Worksheets("Activity").Cells(B, 1).Value
Worksheets("bb").Cells(a, 22).Value =
Worksheets("BB").Cells(a, 22).Value & ". ;" &
Worksheets("Activity").Cells(B, 2).Value & ";" &
Worksheets("Activity").Cells(B, 8).Value
End If
Next a
Next B
End Function
Function neha4()
B = 2
For B = 2 To 50
For a = 3 To 100
If Worksheets("Activity").Cells(B, 4).Value =
Worksheets("DGE").Cells(a, 1).Value Then
Worksheets("DGE").Cells(a, 32).Value =
Worksheets("Activity").Cells(B, 10).Value
Worksheets("DGE").Cells(a, 21).Value =
Worksheets("Activity").Cells(B, 1).Value
Worksheets("DGE").Cells(a, 22).Value =
Worksheets("DGE").Cells(a, 22).Value & ". ;" &
Worksheets("Activity").Cells(B, 2).Value & ";" &
Worksheets("Activity").Cells(B, 8).Value
End If
Next a
Next B
End Function
Function neha5()
B = 2
For B = 2 To 50
For a = 3 To 100
If Worksheets("Activity").Cells(B, 4).Value =
Worksheets("IPLC VCIPLC").Cells(a, 1).Value Then
Worksheets("IPLC VCIPLC").Cells(a, 32).Value =
Worksheets("Activity").Cells(B, 10).Value
Worksheets("IPLC VCIPLC").Cells(a, 21).Value =
Worksheets("Activity").Cells(B, 1).Value
Worksheets("IPLC VCIPLC").Cells(a, 22).Value =
Worksheets("IPLC VCIPLC").Cells(a, 22).Value & ". ;" &
Worksheets("Activity").Cells(B, 2).Value & ";" &
Worksheets("Activity").Cells(B, 8).Value
End If
Next a
Next B
End Function
Function neha6()
B = 2
For B = 2 To 50
For a = 3 To 150
If Worksheets("Activity").Cells(B, 4).Value =
Worksheets("Voice").Cells(a, 1).Value Then
Worksheets("Voice").Cells(a, 31).Value =
Worksheets("Activity").Cells(B, 10).Value
Worksheets("Voice").Cells(a, 10).Value =
Worksheets("Activity").Cells(B, 1).Value
Worksheets("VOICE").Cells(a, 21).Value =
Worksheets("VOICE").Cells(a, 22).Value & ". ;" &
Worksheets("Activity").Cells(B, 2).Value & ";" &
Worksheets("Activity").Cells(B, 8).Value
End If
Next a
Next B
End Function
===================================
All I am doing with this code is
Auto update of Column J (Activity sheet) into column V of
Voice, BB, IPLC VCIPLC, IP_MPLS and BB sheet. (Replacement of the
content).
Auto update of Column H (Activity sheet) into column AF of
Voice, BB, IPLC VCIPLC, IP_MPLS and BB sheet. (Additon to the existing
cell content in the format as todaydate;update).
Now code written is ineffieicinet and takes lot of time.
Please can anyone work on this and advise changes.Please take this
important
|