How could copy cell contents in merged cell to another merged cell

Mussala

Board Regular
Joined
Sep 28, 2022
Messages
74
Office Version
  1. 2019
Platform
  1. Windows
I have cell contents in merged cell in F7:K9 in SH1 sheet . I would copy to OUT sheet in F7:K9 without cancel merging cells.
thanks
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Maybe...
VBA Code:
Sheets("OUT").Range("F7").Value = Sheets("SH1").Range("F7").Value
 
Upvote 0
thanks mark
this cancels merged cell and put in one cell!
it will just copy in F7 , should be F7:K9 as the original in SH1 sheet.
 
Upvote 0
For me I get the results below, with the code below (Sheet names are in the bottom lreft corner of the XL2BB screenshots)

Or are you saying F7:K9 isn't merged on sheet "OUT"?

VBA Code:
Sub xxxx()
Sheets("OUT").Range("F7").Value = Sheets("SH1").Range("F7").Value
End Sub


Before the code

Book1
EFGHIJKL
5
6
7Thiis is a merged cell
8
9
10
11
12
SH1

Book1
EFGHIJKL
5
6
7
8
9
10
11
12
OUT


After the code runs, result on sheet "OUT"

Book1
EFGHIJKL
5
6
7Thiis is a merged cell
8
9
10
11
12
OUT
 
Upvote 0
Or are you saying F7:K9 isn't merged on sheet "OUT"?
If the above is true then try either...

VBA Code:
Sub yyyy()
Sheets("SH1").Range("F7:K9").Copy Sheets("OUT").Range("F7")
End Sub

or

VBA Code:
Sub zzz()
Sheets("SH1").Range("F7").MergeArea.Copy Sheets("OUT").Range("F7")
End Sub
 
Last edited:
Upvote 0
Solution
QWER
ABCDEFGHIJKL
1
2
3
4
5
6
7this is a merged cell
8
9
10
11
12
13
14
SH1


QWER
ABCDEFGHIJK
1
2
3
4
5
6
7this is a merged cell
8
9
10
11
12
13
out
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top