Private Sub Workbook_Open() Application.ScreenUpdating = False For xc = 2 To 5 For yc = 351 To 396 digo = yc - 240 + (xc - 2) * 46 logg.Cells(yc - 340 + (xc - 2) * 46, 1).FormulaR1C1 = "='R:\Manufacture\Production\Mixing\details\Line\[Line_setup.xlsx]1'!R" & Mid(Str(digo), 2, Len(Str(digo)) - 1) & "C1" logg.Cells(yc - 340 + (xc - 2) * 46, 1) = logg.Cells(yc - 340 + (xc - 2) * 46, 1).Value If logg.Cells(yc - 340 + (xc - 2) * 46, 1) = 0 Then logg.Cells(yc - 340 + (xc - 2) * 46, 1) = "" logg.Cells(yc - 340, 100).FormulaR1C1 = "='R:\Manufacture\Production\Mixing\details\Line\[Line_setup.xlsx]1'!R" & Mid(Str(yc - 349), 2, Len(Str(yc - 349)) - 1) & "C7" logg.Cells(yc - 340, 100) = logg.Cells(yc - 340, 100).Value If logg.Cells(yc - 340, 100) = 0 Then logg.Cells(yc - 340, 100) = "" ' If yc < 385 Then logg.Cells(yc, xc).FormulaR1C1 = "='R:\Manufacture\Production\Mixing\details\Line\[Line_setup.xlsx]1'!R" & Mid(Str(yc - 347), 2, Len(Str(yc - 347)) - 1) & "C" & Chr(xc + 47) If logg.Cells(yc, xc) = 0 Then logg.Cells(yc, xc) = "" ' End If Next yc, xc With Sheets("Log") .Range("B351:E392").Copy .Range("B351").PasteSpecial Paste:=xlPasteValues .Activate End With 'logg.Activate 'Sheets("Log") 'Range("B351:E392").Select ' Selection.Copy ' Range("B351").Select ' Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ ' :=False, Transpose:=False '========================iauee nienie iia?aoi?ia popo.lo.Clear Z = 350 logg.Cells(350, 11) = "Name" For X = 2 To 5 For Y = 351 To 388 If logg.Cells(Y, X) = "" Then GoTo 6050 logg.Cells(Z, 11) = logg.Cells(Y, X) Z = Z + 1 6050 Next Y, X Range(logg.Cells(350, 11), logg.Cells(Z, 11)).Select Selection.AutoFilter Selection.Sort Key1:=Range("K350"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Selection.AutoFilter 'For gj = 351 To Z 'popo.lo.AddItem Cells(Z, 11) 'Next gj '======================================= 'logg.Cells(3, 3) = "Smart report 1.0(4)" Application.ScreenUpdating = True a.Visible = xlSheetVisible For Each w In Worksheets If w.Name <> a.Name Then w.Visible = xlVeryHidden mee = Val(Mid(w.Name, 4, 2)) dee = Val(Mid(w.Name, 1, 2)) If mee = Month(Now) Then If Abs(dee - Day(Now)) < 2 Then w.Visible = xlSheetVisible End If Next w fv.Visible = xlSheetVeryHidden 1111 End Sub