I'm not 100% sure but looking at your code here:
Sub SeachName_ArraySet_A()
Dim lngRet As Long, lngCount As Long, lngVar As Long
Dim var As Variant, varSheets As Variant, varBooks As Variant
Dim a1 As Integer, a2 As Integer, bk As Integer
Dim wb As Workbook, ws As Worksheet
var = Array("Azizah Yusoff", "Hoo Zhe Yee", "Ong Xie Jun", "Gregory Gan Chong Hee", "Ong Pui Sin")
varSheets = Array("Azizah", "Zhe Yee", "Xie Jun", "Gregory Gan", "Ong Pui")
varBooks = Array("BUSINESS BANKING.xlsx", "Auto Finance.xlsx", "Small Medium Enterprise.xlsx")
For bk = LBound(varBooks) To UBound(varBooks)
Set wb = Workbooks(varBooks(bk))
For lngVar = LBound(var) To UBound(var)
For Each ws In wb.Worksheets
If ws.Name = CStr(varSheets(lngVar)) Then GoTo Matchup
Next: GoTo GetNext
Matchup:
lngRet = MatchName(ThisWorkbook.Name, "SOP BUSINESS UNIT - ORIGINATOR", CStr(var(lngVar)), 6)
If lngRet <> 0 Then
For lngCount = 0 To 11
'No.1
ThisWorkbook.Sheets("SOP BUSINESS UNIT - ORIGINATOR").Range("F" & lngRet).Offset(0, 3 + lngCount).Value = _
wb.Worksheets(CStr(varSheets(lngVar))).Range("H601").Offset(0, lngCount * 3).Value
'No.2
ThisWorkbook.Sheets("SOP BUSINESS UNIT - ORIGINATOR").Range("F" & lngRet).Offset(0, 15 + lngCount * 3).Value = _
wb.Worksheets(CStr(varSheets(lngVar))).Range("H606").Offset(0, lngCount * 3).Value
'No.3
'No.4
'No.5
'No.6
'No.7
'No.8
'No.9
Next lngCount
'No.10
ThisWorkbook.Sheets("SOP BUSINESS UNIT - ORIGINATOR").Range("F" & lngRet).Offset(0, 494).Value = _
wb.Worksheets(CStr(varSheets(lngVar))).Range("P612").Value
ThisWorkbook.Sheets("SOP BUSINESS UNIT - ORIGINATOR").Range("F" & lngRet).Offset(0, 495).Value = _
wb.Worksheets(CStr(varSheets(lngVar))).Range("P614").Value
'''''''''''''''''''''''''''''Maybe the percentage of progress bar update here''''''''''''''''''''''''''''''''
Dim PercentComplete As Single, SubPercent As Single
Dim MaxRow As Long, lRow As Long, lTot As Long
Dim lCounter As Long, lIncre As Long, lSubTot As Long
Dim MaxCol As Integer, iCol As Integer
Dim StartCol As Integer, StartRow As Long
MaxRow = Cells(Rows.Count, "F").End(xlUp).Row
MaxCol = 501
StartRow = 13: StartCol = 9
lTot = Range(Cells(StartRow, StartCol), Cells(MaxRow, MaxCol)).Rows.Count
lSubTot = MaxCol - StartCol
For lRow = StartRow To MaxRow
For iCol = StartCol To MaxCol
Worksheets("SOP BUSINESS UNIT - ORIGINATOR").Cells(lRow, iCol).Value = lRow
lIncre = lIncre + 1
SubPercent = lIncre / lSubTot
Application.StatusBar = Format(PercentComplete, "0%") & " Completed " & Format(SubPercent, "(0%)") & " In Progress"
Next
lCounter = lCounter + 1
PercentComplete = lCounter / lTot
Application.StatusBar = Format(PercentComplete, "0%") & " Completed"
DoEvents
lIncre = 0
Next
Application.StatusBar = ""
End If
GetNext: Next lngVar
Set wb = Nothing
Next bk
End Sub
I think the problem could be that you are looping through the "progress bar" bit several times as part of the For lngVar = LBound(var) To UBound(var) but I don't think you reset the lCounter that you base your progress bar on, so for the 2nd, 3rd, 4th times etc, it will be going from whatever the previous lCounter value was. So maybe try adding, Lcounter = 0 before the for lrow = startrow to maxrow bit, e.g.:
Sub SeachName_ArraySet_A()
Dim lngRet As Long, lngCount As Long, lngVar As Long
Dim var As Variant, varSheets As Variant, varBooks As Variant
Dim a1 As Integer, a2 As Integer, bk As Integer
Dim wb As Workbook, ws As Worksheet
var = Array("Azizah Yusoff", "Hoo Zhe Yee", "Ong Xie Jun", "Gregory Gan Chong Hee", "Ong Pui Sin")
varSheets = Array("Azizah", "Zhe Yee", "Xie Jun", "Gregory Gan", "Ong Pui")
varBooks = Array("BUSINESS BANKING.xlsx", "Auto Finance.xlsx", "Small Medium Enterprise.xlsx")
For bk = LBound(varBooks) To UBound(varBooks)
Set wb = Workbooks(varBooks(bk))
For lngVar = LBound(var) To UBound(var)
For Each ws In wb.Worksheets
If ws.Name = CStr(varSheets(lngVar)) Then GoTo Matchup
Next: GoTo GetNext
Matchup:
lngRet = MatchName(ThisWorkbook.Name, "SOP BUSINESS UNIT - ORIGINATOR", CStr(var(lngVar)), 6)
If lngRet <> 0 Then
For lngCount = 0 To 11
'No.1
ThisWorkbook.Sheets("SOP BUSINESS UNIT - ORIGINATOR").Range("F" & lngRet).Offset(0, 3 + lngCount).Value = _
wb.Worksheets(CStr(varSheets(lngVar))).Range("H601").Offset(0, lngCount * 3).Value
'No.2
ThisWorkbook.Sheets("SOP BUSINESS UNIT - ORIGINATOR").Range("F" & lngRet).Offset(0, 15 + lngCount * 3).Value = _
wb.Worksheets(CStr(varSheets(lngVar))).Range("H606").Offset(0, lngCount * 3).Value
'No.3
'No.4
'No.5
'No.6
'No.7
'No.8
'No.9
Next lngCount
'No.10
ThisWorkbook.Sheets("SOP BUSINESS UNIT - ORIGINATOR").Range("F" & lngRet).Offset(0, 494).Value = _
wb.Worksheets(CStr(varSheets(lngVar))).Range("P612").Value
ThisWorkbook.Sheets("SOP BUSINESS UNIT - ORIGINATOR").Range("F" & lngRet).Offset(0, 495).Value = _
wb.Worksheets(CStr(varSheets(lngVar))).Range("P614").Value
'''''''''''''''''''''''''''''Maybe the percentage of progress bar update here''''''''''''''''''''''''''''''''
Dim PercentComplete As Single, SubPercent As Single
Dim MaxRow As Long, lRow As Long, lTot As Long
Dim lCounter As Long, lIncre As Long, lSubTot As Long
Dim MaxCol As Integer, iCol As Integer
Dim StartCol As Integer, StartRow As Long
lCounter = 0
MaxRow = Cells(Rows.Count, "F").End(xlUp).Row
MaxCol = 501
StartRow = 13: StartCol = 9
lTot = Range(Cells(StartRow, StartCol), Cells(MaxRow, MaxCol)).Rows.Count
lSubTot = MaxCol - StartCol
For lRow = StartRow To MaxRow
For iCol = StartCol To MaxCol
Worksheets("SOP BUSINESS UNIT - ORIGINATOR").Cells(lRow, iCol).Value = lRow
lIncre = lIncre + 1
SubPercent = lIncre / lSubTot
Application.StatusBar = Format(PercentComplete, "0%") & " Completed " & Format(SubPercent, "(0%)") & " In Progress"
Next
lCounter = lCounter + 1
PercentComplete = lCounter / lTot
Application.StatusBar = Format(PercentComplete, "0%") & " Completed"
DoEvents
lIncre = 0
Next
Application.StatusBar = ""
End If
GetNext: Next lngVar
Set wb = Nothing
Next bk
End Sub
Bookmarks