ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move text data including detailed formatting (https://www.excelbanter.com/excel-programming/389385-move-text-data-including-detailed-formatting.html)

Adrian

Move text data including detailed formatting
 
Hello,
Can anyone help with the following:

I want to move some text data from one worksheet to another. Some of the
text entries are partially formatted (i.e., the font of only some characters
in the cell is bold, or in color, etc).

I've tried to use the Characters property, but I don't know how to read the
(start, length) values and the rest of the font properties from the source
cell.

In advance thank you!

Adrian, Ottawa

Gary''s Student

Move text data including detailed formatting
 
The best way is copy/paste:

Sub movit()
Set r1 = Sheets("Sheet1").Range("A1")
Set r2 = Sheets("Sheet2").Range("A2")
r1.Copy r2
End Sub
--
Gary''s Student - gsnu200721


All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com