Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
Dim lEndRow As Long, lStartRow As Long
Dim FormSh As Worksheet: Set FormSh = Sheets("GL Summary")
With FormSh
lStartRow = .Range("A2").Row
lEndRow = .Range("A" & .Rows.Count).End(xlUp).Row
For n = lStartRow To lEndRow
Next
End With
Dim lEndRow As Long, lStartRow As Long
Dim FormSh As Worksheet: Set FormSh = Sheets("GL Summary")
With FormSh
Set BaseWks = ActiveSheet
Range("A1").Activate
ActiveCell.EntireColumn.Insert
Range("A1").Value = "Unique"
lStartRow = .Range("A2").Row
lEndRow = .Range("A" & .Rows.Count).End(xlUp).Row
'For n = lStartRow To lEndRow
' Next
End With
Sub x()
Dim lEndRow As Long, lStartRow As Long
Dim FormSh As Worksheet: Set FormSh = Sheets("GL Summary")
Dim BaseWks As Worksheet
With FormSh
Set BaseWks = ActiveSheet
Range("A1").EntireColumn.Insert
Range("A1").Value = "Unique"
lStartRow = .Range("A2").Row
lEndRow = .Range("A" & .Rows.Count).End(xlUp).Row
.Range("B2", .Range("B" & .Rows.Count).End(xlUp)).Offset(, -1).Formula = "=C2&D2"
End With
End Sub
Set BaseWks = ActiveSheet
Range("A1").Activate
ActiveCell.EntireColumn.Insert
Range("A1").Value = "Unique"
LastRow = BaseWks.UsedRange.Rows.Count - BaseWks.UsedRange.Row + 1
n = 2
For n = BaseWks.UsedRange.Row To LastRow
BaseWks.Cells(n, "A").Formula = Range("C" & n).Value & Range("D" & n).Value
Next n
Set BaseWks = ActiveSheet
Range("A1").Activate
ActiveCell.EntireColumn.Insert
LastRow = BaseWks.UsedRange.Rows.Count - BaseWks.UsedRange.Row + 1
n = 1
For n = BaseWks.UsedRange.Row To LastRow
BaseWks.Cells(n, "A").Formula = Range("D" & n).Value & Range("E" & n).Value
Next n
Range("A1").Value = "Unique" 'It renames it here
BaseWks.Columns.AutoFit
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Join the community of 500,000 technology professionals and ask your questions.