Mistři v programování na #hovnokod

Visual Basic #1139

I tak se dá napsat kód na odstranění mezery v excelu ve dvou listech.

Sub Odstran_mezeru_O()
    Sheets("O").Select
    Dim Bunka, Radek
    Radek = 1
    
    Cells(1, 1).Value = "Hrac"
    Cells(1, 2).Value = "Shot"
    Cells(1, 3).Value = "G"
    Cells(1, 4).Value = "A"
    Cells(1, 5).Value = "PM"
    Cells(1, 6).Value = "Vyk"
    Cells(1, 7).Value = "Tym"
    
    Bunka = Cells(Radek, 1).Value
    Do While Bunka <> ""
        If Mid(Bunka, 1, 1) = " " Then
            Cells(Radek, 1) = Trim(Bunka)
            Cells(Radek, 7) = Trim(Cells(Radek, 7))
        End If
        Radek = Radek + 1
        Bunka = Cells(Radek, 1).Value
    Loop
End Sub

Sub Odstran_mezeru_U()
    Sheets("U").Select
    Dim Bunka, Radek
    Radek = 1
    
    Cells(1, 1).Value = "Hrac"
    Cells(1, 2).Value = "Shot"
    Cells(1, 3).Value = "G"
    Cells(1, 4).Value = "A"
    Cells(1, 5).Value = "PM"
    Cells(1, 6).Value = "Vyk"
    Cells(1, 7).Value = "Tym"
    
    Bunka = Cells(Radek, 1).Value
    Do While Bunka <> ""
        If Mid(Bunka, 1, 1) = " " Then
            Cells(Radek, 1) = Trim(Bunka)
            Cells(Radek, 7) = Trim(Cells(Radek, 7))
        End If
        Radek = Radek + 1
        Bunka = Cells(Radek, 1).Value
    Loop
End Sub

Anonymous,