• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy the backgorund colour and content from one cell into another

sliderxb

New Member
example in cell a1 on worksheet 1 i have a red background and text

cell a2 yellow background and text etc etc


is there a macro, formula, vb script that anyone knows to do this


thanks
 
A formula can't do it, but the VB script is simple enough.

Works by using this syntax

RangeToCopy.Copy Destination


Example:

Code:
Worksheets("Sheet1").Range("A1:A2").Copy Worksheets("Sheet2").Range("A1")


this would copy cells A1:a2 from Sheet1 to Sheet2. This type of copying copies cell contents and formatting (including color).


PS. Not sure if you noticed, but your website in your profile is missing a "w" at the beginning. =)
 
Hi, sliderxb!

Check this points:

- exists source worksheet "Sheet1"?

- exists target worksheet "Sheet2"?

- range A1:A2 in target worksheet is protected?

- target worksheet has change event procedure?

If not or if not sure, consider uploading the sample file better than posting the whole procedure code.

Regards!
 
Back
Top