Sub ZGORAJ()
Application.ScreenUpdating = False
Dim lRow As Long, r As Long
Sheets("Spremni list ZGORAJ").Copy
With ActiveSheet
.UsedRange.Cells.Value = ActiveSheet.UsedRange.Cells.Value
lRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For r = lRow To 10 Step -1
If .Cells(r, 2) = .Range("BESEDA_TRI_ZG") Then
.Cells(r + 1, 2).EntireRow.Insert Shift:=xlDown
.Cells(r, 2).EntireRow.Insert Shift:=xlDown
.Cells(r, 1) = Sheets("Spremni list ZGORAJ").Range("PRED_BESEDO_TRI_ZG")
.Range("A" & r).Resize(, 7).HorizontalAlignment = xlCenterAcrossSelection
.Range("A" & r).Font.Color = vbRed
.Range("A" & r).Font.Bold = True
.Cells(r + 2, 1) = Sheets("Spremni list ZGORAJ").Range("ZA_BESEDO_TRI_ZG")
.Range("A" & r + 2).Resize(, 7).HorizontalAlignment = xlCenterAcrossSelection
.Range("A" & r + 2).Font.Color = vbRed
.Range("A" & r + 2).Font.Bold = True
End If
If .Cells(r, 2) = .Range("BESEDA_DVA_ZG") Then
.Cells(r + 1, 2).EntireRow.Insert Shift:=xlDown
.Cells(r + 1, 1) = Sheets("Spremni list ZGORAJ").Range("ZA_BESEDO_DVA_ZG")
.Range("A" & r + 1).Resize(, 7).HorizontalAlignment = xlCenterAcrossSelection
.Range("A" & r + 1).Font.Color = vbRed
.Range("A" & r + 1).Font.Bold = True
End If
If .Cells(r, 2) = .Range("BESEDA_ENA_ZG") Then
.Cells(r, 2).EntireRow.Insert Shift:=xlDown
.Cells(r, 1) = Sheets("Spremni list ZGORAJ").Range("PRED_BESEDO_ENA_ZG")
.Range("A" & r).Resize(, 7).HorizontalAlignment = xlCenterAcrossSelection
End If
Next r
End With
Range("D7,D6,D5,A10:A49").Select
Selection.Replace What:=",", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="/", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="spod..", Replacement:="spod.,", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.Goto Reference:="ZG_NOGA"
Selection.Cut
Range("A50").Select
ActiveSheet.Paste
ActiveSheet.Shapes.Range(Array("Button 2")).Select
Selection.Delete
End Sub
Bookmarks