Sub entitle()

    Dim foods As Variant

    Dim prices As Variant

    Dim adjustedPrices As Variant

    Dim i As Integer


    ' 배열에 데이터 저장

    foods = Array("pizza", "chicken", "meat", "coke", "spaghetti")

    prices = Array(2400, 5000, 1000, 6000, 10000)

    adjustedPrices = Array(2400 - 1500, 5000 - 2000, 1000 - 500, 6000 - 3200, 10000 - 5500)


    ' 배열의 데이터를 셀에 채우기

    For i = 0 To 4

        Range("A3").Offset(i, 0).Value = foods(i)

        Range("B3").Offset(i, 0).Value = prices(i)

        Range("C3").Offset(i, 0).Value = adjustedPrices(i)

    Next i

End Sub



==================================================================
Sub entitle()
    
    

    Range("A3").Value = "pizza"
    Range("A4").Value = "chicken"
    Range("A5").Value = "meat"
    Range("A6").Value = "coke"
    Range("A7").Value = "spaghetti"
    
    Range("B3").Value = "2400"
    Range("B4").Value = "5000"
    Range("B5").Value = "1000"
    Range("B6").Value = "6000"
    Range("B7").Value = "10000"
    
    Range("C3").Value = 2400 - 1500
    Range("C4").Value = 5000 - 2000
    Range("C5").Value = 1000 - 500
    Range("C6").Value = 6000 - 3200
    Range("C7").Value = 10000 - 5500
    
    
    
End Sub