Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub E_ConvertToText()
- Dim ws As Worksheet
- Dim lastRow As Long
- Dim i As Long
- ' Set worksheet to convert values in
- Set ws = Worksheets("AssetScope")
- ' Find the last row in column G
- lastRow = ws.Cells(ws.Rows.Count, "G").End(xlUp).Row
- ' Loop through rows in column G
- For i = 2 To lastRow
- ' Convert formula to value
- ws.Range("G" & i).Value = ws.Range("G" & i).Value
- Next i
- ' Convert column G to text format
- ws.Range("G:G").NumberFormat = "@"
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement