McGabbarah
02-11-2020, 01:59 AM
Hi
I am trying to read a column of cells and have the content of the cell read into a variable as text.
I am using a for next loop.
Sub SplitCellBelowTotal()
Dim i As Long
Dim x As Long
Dim CurrentRecord As String
Range("A1").Select
x = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To x
CurrentRecord = Right("A" & i, 5) ' want cell text characters
MsgBox Chr(CurrentRecord)
If CurrentRecord = "Total" Then ActiveCell.EntireRow.Insert
Next i
End Sub
Hope you understand what I am trying to do
I am trying to read a column of cells and have the content of the cell read into a variable as text.
I am using a for next loop.
Sub SplitCellBelowTotal()
Dim i As Long
Dim x As Long
Dim CurrentRecord As String
Range("A1").Select
x = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To x
CurrentRecord = Right("A" & i, 5) ' want cell text characters
MsgBox Chr(CurrentRecord)
If CurrentRecord = "Total" Then ActiveCell.EntireRow.Insert
Next i
End Sub
Hope you understand what I am trying to do