syntax question

Public Schedule Face-to-Face & Virtual Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Syntax question

Syntax question

resolvedResolved · Low Priority · Version 2016

Diane has attended:
Excel VBA Introduction course
Excel VBA Intermediate course
Excel VBA Advanced course

Syntax question

Hi, How could I modify this code to maintain the format of the source cell? I know I could change the whay I do it, but if I can modify this simple statement I would rather.

Range(sCopyFromRange).Copy _

RE: Syntax question

Hi Diane,

I think this already does this.

I've just checked with this line and it keeps the formatting applied to A1.

Range("A1").Copy Range("A2")

Does this do what you need?

Let me know if I've misunderstood.


RE: Syntax question

Hi Claire

No, it isn't taking my formatting across, but I think you are right it should be. I have a cell colour on my source but the cell after copy on the target remains default no colour.



RE: Syntax question

Hi Diane,

Sorry to hear it's not behaving as expected.

Please let us know if you have any further questions.


Will be marked as resolved in 5 days

Notice: This is an automated message. Due to inactivity, this forum post will be marked as 'resolved' if there are no further responses in the next 5 days.

Fri 6 Sep 2019: Automatically marked as resolved.


Training courses


Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


Excel tip:

Add Text to Displayed Numbers in Excel 2010

To add text to a number in a cell, you need to go to the Home tab on the Ribbon, and click on the Cells group. Select Format Cells from the drop down menu then Custom from the Category list. In the Type box select General. After the word General, enter a space, then opening quotation marks, then the word you want to type and then closing quotation marks. Click on OK and you have your text!

View all Excel hints and tips

Server loaded in 0.07 secs.