A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
You can skip one sheet using this:
Sub ApplyFormulaToSheets()
Dim ws As Worksheet
Dim lastRow As Long
For Each ws In ThisWorkbook.Worksheets
' Skip this sheet
If ws.Name <> "Guage_Liste_DB" Then
If Application.WorksheetFunction.CountA(ws.Cells) > 0 Then
' Insert new column at F (shift right)
ws.Columns("F").Insert Shift:=xlToRight
' Find last used row
lastRow = ws.Cells.Find("*", _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
' Apply formula from F6 down in the NEW column
If lastRow >= 6 Then
ws.Range("F6:F" & lastRow).Formula = "=(C6+E6)/2"
End If
End If
End If
Next ws
End Sub
Please note that if you use Insert, each time you run the macro, it will create a new column at F.