I want to merge two cells and that new cell to fill with "asdf".
How could I do that?
I want to merge two cells and that new cell to fill with "asdf".
How could I do that?
Hi M,
> I want to merge two cells and that new cell to fill with "asdf".
> How could I do that?
Avoiding the temptation to respomd "Don't!", because there are all kinds of
potential problems associated with the use of merged cells, try:
'=============>>
Public Sub Tester001()
Dim rng As Range
Set rng = Range("A1:B1") '<<==== CHANGE
With Range("B14:C14")
.ClearContents
.Item(1).Value = "asdf"
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = True
End With
End Sub
'<<============
---
Regards,
Norman
"mpele" <[email protected]> wrote in
message news:[email protected]...
>
> I want to merge two cells and that new cell to fill with "asdf".
> How could I do that?
>
>
> --
> mpele
> ------------------------------------------------------------------------
> mpele's Profile:
> http://www.excelforum.com/member.php...o&userid=31808
> View this thread: http://www.excelforum.com/showthread...hreadid=520454
>
Hi M,
> With Range("B14:C14")
Should read:
With rng
---
Regards,
Norman
mpele,
Agreeing with Norman to avoid this unless you really have to, you could have
recorded a macro of the actions and got the answer in all of 10 seconds.
This is the best to start something that you are not sure of. From there,
edit the code as necessary, adding variables, error checks, loops etc to
enhance.
Nick
"mpele" <[email protected]> wrote in
message news:[email protected]...
>
> I want to merge two cells and that new cell to fill with "asdf".
> How could I do that?
>
>
> --
> mpele
> ------------------------------------------------------------------------
> mpele's Profile:
http://www.excelforum.com/member.php...o&userid=31808
> View this thread: http://www.excelforum.com/showthread...hreadid=520454
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks