This line of code bellow will copy the value of the selected cell to next
cell i.e. value of A1 to B1 retaining the formatting of B1


Selection.Offset(0, 1).Value = Selection.Value

hope this helps

Thanks


Regards,
Vivek Agrawal
Contact No. +91-9999-154-077
Skype ID - vivek.agrawal83

GoogleMoonlight.com  - Saving energy-Save Earth



On Mon, Jul 6, 2009 at 10:34 PM, tushar patki <tusharpa...@gmail.com> wrote:

> Dear All,
>
> I have written a code which will copy cell contents from one cell to
> another. Along with the cell contents, also formatting of the cell is
> copied. I am not able to code and keep the formatting as I want. For eg.
>
> Cell A1 has color yellow.
> I copied cell A1 to B1.
>
> The color also gets copied. Please tell me the code which will again retain
> the white colour again.
>
> I tried with RGB function, also with interior property, but I am unable to
> do the same. Pl guide me.
>
>
> --
> Regards
> Tushar S Patki
> CA
> Contact Details -
> 2106, Sadashiv Peth,
> Dattaprasad Apartment,
> Pune - 411030.
> State: Maharashtra
> Country: India
> Phone - +91-020-24337003
> Mobile - 09850715116
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 5,000 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to