Sub ConvertColumnToLower()
Dim x As Long
Dim lastRow As Long
lastRow = Cells(Rows.Count, "A").End(xlUp).Row ' 找 A 欄最後非空列
For x = 1 To lastRow
Cells(x, "A").Value = LCase(Cells(x, "A").Value)
Next x
End Sub
Rows.Count:工作表最大列數(1048576),配合 End(xlUp) 從底部向上找最後有資料的列,避免硬寫 65536(舊版限制)。LCase:將字串轉為小寫;大寫請用 UCase。Cells(x, "A"):以列號、行號參考儲存格,比 Range("A" & x) 效能更好。不需寫 VBA,直接在輔助欄輸入 =LOWER(A1) 向下填滿 → 複製 → 選擇性貼上「數值」覆蓋原欄,同樣達到效果。