テスト30



Sub Clstest()

'標準モジュール
'クラス型配列っぽいもの

Dim clsHensu As Hensu
Dim i As Long
Dim Las_Row As Long
Dim myPersons As Collection

Set clsHensu = New Hensu
Set myPersons = New Collection

Las_Row = ThisWorkbook.Sheets("テスト").Cells(Rows.Count, 7).End(xlUp).Row

With ThisWorkbook.Sheets("テスト")

    For i = 2 To Las_Row

        Set clsHensu = New Hensu

        clsHensu.Takasa = .Cells(i, 7)
        clsHensu.Taijuu = .Cells(i, 8)
        clsHensu.Jusyo = .Cells(i, 9)
        clsHensu.Nenrei = .Cells(i, 10)
        clsHensu.Eat = .Cells(i, 11)
        clsHensu.Sports = .Cells(i, 12)
        myPersons.Add clsHensu, CStr(.Cells(i, 6).Value)

    Next

End With

'-----------------------------------------------
Dim c As Variant
i = 2
With ThisWorkbook.Sheets("テスト")

    For Each c In myPersons

        .Cells(i + 10, 7) = c.Takasa
        .Cells(i + 10, 8) = c.Taijuu
        .Cells(i + 10, 9) = c.Jusyo
        .Cells(i + 10, 10) = c.Nenrei
        .Cells(i + 10, 11) = c.Eat
        .Cells(i + 10, 12) = c.Sports

        i = i + 1

    Next

End With


End Sub

'-----------------------------------------

'クラスモジュール(Hensu)

Public Takasa As Long
Public Taijuu As Long
Public Jusyo As Variant
Public Nenrei As Long
Public Eat As String
Public Sports As String

'----------------------------------------
'ステータスバー

Application.StatusBar = False

Application.StatusBar = "進捗状況:□□□□□"

Application.StatusBar = "進捗状況:■□□□□"

Application.StatusBar = "進捗状況:■■□□□"

Application.StatusBar = "進捗状況:■■■□□"

Application.StatusBar = "進捗状況:■■■■□"

Application.StatusBar = "進捗状況:■■■■■"

Application.StatusBar = False


Sub Macro4()

Dim i As Long

i = 2
With ThisWorkbook.Sheets("Sheet8")

    Do Until .Cells(i, 1).Value = ""

    '    ActiveCell.FormulaR1C1 = "20210529"
        .Cells(i, 1).FormulaR1C1 = .Cells(i, 1).Text

        i = i + 1

    Loop

End With


End Sub