Option Explicit
Sub Button1_Click()
Dim wb As Workbook
Dim ws As Worksheet
Dim FarmerName() As String
Dim PurchasedAmount() As Long
Dim LastRow, NameRow, AmountRow As Long
Dim i, j, k As Integer
i = 1
j = 1
k = 1
Worksheets(1).Activate
Range("F:F").NumberFormat = "General"
LastRow =...