SilentRomance
New Member
- Joined
- Aug 4, 2021
- Messages
- 46
- Office Version
- 2016
- 2010
- Platform
- Windows
Hi guys,
I am using VBA code to merge a cells below the row that has data.
I can't use specific value of the RANGE() because the data will be increased or decreased anytime.
This the code i"m using but when I run the code the macro give me a warning message
Can you help me about this
I am new in VBA language so sorry for the **** logic.
And also that merged cells have a value like "This all the total of credit".
I am using VBA code to merge a cells below the row that has data.
I can't use specific value of the RANGE() because the data will be increased or decreased anytime.
This the code i"m using but when I run the code the macro give me a warning message
VBA Code:
Sub Cert()
Dim cer As Long
cer = Cells(Rows.Count, 1).End(xlUp).Row + 1
With Range("cer + 2" & 1 & ",cer + 2" & 6 & "")
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
End Sub
Can you help me about this
I am new in VBA language so sorry for the **** logic.
And also that merged cells have a value like "This all the total of credit".
Last edited: