Thema
|
Datum
|
Von Nutzer
|
Rating
|
Antwort
|
|
24.11.2019 10:55:31 |
starfrench |
|
|
|
24.11.2019 11:45:15 |
Werner |
|
|
Autifillfunktion im Makro |
24.11.2019 12:35:39 |
Gast52443 |
|
|
|
24.11.2019 14:49:12 |
Werner |
|
|
|
24.11.2019 15:26:55 |
starfrench |
|
|
|
24.11.2019 15:47:26 |
Gast59403 |
|
|
|
24.11.2019 16:18:03 |
Werner |
|
|
|
24.11.2019 16:33:45 |
starfrench |
|
|
|
25.11.2019 17:41:37 |
starfrench |
|
|
Von:
Gast52443 |
Datum:
24.11.2019 12:35:39 |
Views:
495 |
Rating:
|
Antwort:
|
Thema:
Autifillfunktion im Makro |
ich habe mal das ganze Makro reinkopiert. Hoffe das ist was du meintest.
Fett habe ich die Zeilen markiert, die die Spalten L und M betreffen.
-
Sub SBZ()
-
'
-
' SBZ Makro
-
' Berechnen der Störbestehenszeiten
-
'
-
-
'
-
Range("B2").Select
-
ActiveWindow.FreezePanes = True
-
Columns("B:B").Select
-
Selection.NumberFormat = "dd/mm/yy;@"
-
Columns("F:F").Select
-
Selection.NumberFormat = "dd/mm/yy;@"
-
Columns("H:H").Select
-
Selection.NumberFormat = "dd/mm/yy;@"
-
Columns("C:C").Select
-
Selection.NumberFormat = "h:mm:ss;@"
-
Columns("G:G").Select
-
Selection.NumberFormat = "h:mm:ss;@"
-
Columns("I:I").Select
-
Selection.NumberFormat = "h:mm:ss;@"
-
Columns("L:L").Select
-
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
-
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
-
Range("L2").Select
-
ActiveCell.FormulaR1C1 = "=(RC[-4]+RC[-3]-(RC[-6]+RC[-5]))*24*60"
-
Selection.AutoFill Destination:=Range("L2:L33")
-
Range("L2:L33").Select
-
Columns("L:L").Select
-
Selection.NumberFormat = "General"
-
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
-
Formula1:="=30"
-
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
-
With Selection.FormatConditions(1).Interior
-
.PatternColorIndex = xlAutomatic
-
.Color = 255
-
.TintAndShade = 0
-
End With
-
Selection.FormatConditions(1).StopIfTrue = False
-
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
-
Formula1:="=30"
-
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
-
With Selection.FormatConditions(1).Interior
-
.PatternColorIndex = xlAutomatic
-
.Color = 5296274
-
.TintAndShade = 0
-
End With
-
Selection.FormatConditions(1).StopIfTrue = False
-
Range("L1").Select
-
ActiveCell.FormulaR1C1 = "Arb.Zeit"
-
Range("M1").Select
-
ActiveCell.FormulaR1C1 = "SBZ Zeit"
-
Range("M2").Select
-
ActiveCell.FormulaR1C1 = "=(RC[-5]+RC[-4]-(RC[-11]+RC[-10]))*24*60"
-
Columns("M:M").Select
-
Selection.NumberFormat = "General"
-
Range("M2").Select
-
Selection.AutoFill Destination:=Range("M2:M33")
-
Range("M2:M33").Select
-
Columns("M:M").Select
-
Selection.NumberFormat = "General"
-
Selection.NumberFormat = "0"
-
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
-
Formula1:="=240"
-
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
-
With Selection.FormatConditions(1).Interior
-
.PatternColorIndex = xlAutomatic
-
.Color = 255
-
.TintAndShade = 0
-
End With
-
Selection.FormatConditions(1).StopIfTrue = False
-
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
-
Formula1:="=240"
-
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
-
With Selection.FormatConditions(1).Interior
-
.PatternColorIndex = xlAutomatic
-
.Color = 5296274
-
.TintAndShade = 0
-
End With
-
Selection.FormatConditions(1).StopIfTrue = False
-
Cells.Select
-
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
-
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
-
With Selection.Borders(xlEdgeLeft)
-
.LineStyle = xlContinuous
-
.ColorIndex = 0
-
.TintAndShade = 0
-
.Weight = xlThin
-
End With
-
With Selection.Borders(xlEdgeTop)
-
.LineStyle = xlContinuous
-
.ColorIndex = 0
-
.TintAndShade = 0
-
.Weight = xlThin
-
End With
-
With Selection.Borders(xlEdgeBottom)
-
.LineStyle = xlContinuous
-
.ColorIndex = 0
-
.TintAndShade = 0
-
.Weight = xlThin
-
End With
-
With Selection.Borders(xlEdgeRight)
-
.LineStyle = xlContinuous
-
.ColorIndex = 0
-
.TintAndShade = 0
-
.Weight = xlThin
-
End With
-
With Selection.Borders(xlInsideVertical)
-
.LineStyle = xlContinuous
-
.ColorIndex = 0
-
.TintAndShade = 0
-
.Weight = xlThin
-
End With
-
With Selection.Borders(xlInsideHorizontal)
-
.LineStyle = xlContinuous
-
.ColorIndex = 0
-
.TintAndShade = 0
-
.Weight = xlThin
-
End With
-
End Sub
|
- Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
- Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
- Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
- Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
- Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei
Antworten auf Ihren Beitrag zu benachrichtigen
Bitte geben Sie ein aussagekräftiges Thema an.
Bitte geben Sie eine gültige Email Adresse ein!
- Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
- Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
- Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
- Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
- Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei
Antworten auf Ihren Beitrag zu benachrichtigen
Thema
|
Datum
|
Von Nutzer
|
Rating
|
Antwort
|
|
24.11.2019 10:55:31 |
starfrench |
|
|
|
24.11.2019 11:45:15 |
Werner |
|
|
Autifillfunktion im Makro |
24.11.2019 12:35:39 |
Gast52443 |
|
|
|
24.11.2019 14:49:12 |
Werner |
|
|
|
24.11.2019 15:26:55 |
starfrench |
|
|
|
24.11.2019 15:47:26 |
Gast59403 |
|
|
|
24.11.2019 16:18:03 |
Werner |
|
|
|
24.11.2019 16:33:45 |
starfrench |
|
|
|
25.11.2019 17:41:37 |
starfrench |
|
|