Gruppe
Allgemein
Problem
Wie kann ich die Maximalwerte einer Matrix mit gelbem Hintergrund belegen?
StandardModule: Modul1
Sub SaveAsCSV()
Dim iRow As Integer, iCol As Integer, iRowL As Integer, iColL As Integer
Dim sTxt As String, sSep As String, sFile As String
iRowL = Cells(Rows.Count, 1).End(xlUp).Row
iColL = Cells(1, 256).End(xlToLeft).Column
sFile = Application.DefaultFilePath & "\test_csv.csv"
sSep = ";"
Close
Open sFile For Output As #1
For iRow = 1 To iRowL
If Not IsEmpty(Cells(iRow, 3)) Then
For iCol = 1 To iColL
sTxt = sTxt & Cells(iRow, iCol).Value & sSep
Next iCol
sTxt = Left(sTxt, Len(sTxt) - 1)
Print #1, sTxt
sTxt = ""
End If
Next iRow
Close
MsgBox "Datei wurde angelegt:" & vbLf & sFile
End Sub