+ Reply to Thread
Results 1 to 6 of 6

Protecting Cell Format while pasting from another source

  1. #1
    Registered User
    Join Date
    03-17-2016
    Location
    India
    MS-Off Ver
    2010
    Posts
    83

    Protecting Cell Format while pasting from another source

    Hi,

    I want to protect a cell format where if I paste the data from other source format should not get change.

    Ex: I am protecting A1 Cell format with Yellow color background, now I am copying the data from other source which contains Red color background and pasting in A1 Cell (which is format protected) now the target cell background get changed to Red.

    I don't want to get change the format of the cell in any circumstances.

    This problem is arising when I gave a standard template format to site officers, they are copy pasting the data from other files and it is effecting to template

    Kindly advise on above

  2. #2
    Registered User
    Join Date
    02-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: Protecting Cell Format while pasting from another source

    1. Select the Contents

    2. Copy it.

    3. Select Paste Special

    4. Click "Values & Number Formats"

    5. Click "OK".

    Formats Won't get affected. Only the data will change.

    Quote Originally Posted by arshad.99.ali View Post
    Hi,

    I want to protect a cell format where if I paste the data from other source format should not get change.

    Ex: I am protecting A1 Cell format with Yellow color background, now I am copying the data from other source which contains Red color background and pasting in A1 Cell (which is format protected) now the target cell background get changed to Red.

    I don't want to get change the format of the cell in any circumstances.

    This problem is arising when I gave a standard template format to site officers, they are copy pasting the data from other files and it is effecting to template

    Kindly advise on above

  3. #3
    Registered User
    Join Date
    03-17-2016
    Location
    India
    MS-Off Ver
    2010
    Posts
    83

    Re: Protecting Cell Format while pasting from another source

    Hi,
    Thank you for your valuable advise, but I know above procedure to paste only values.

    Concern is I have prepared a standard template for reporting system and it would be shared to all site supervisors.
    they are copying the data from other files and pasting in report template hence it is effecting format in the template

    I can not teach or show to them that how to paste only values as they were More than 100 number of supervisors should report

    if you have any other way to paste the data without effecting any format then kindly let me know.

    Thanks in advance for your help !!!!

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Protecting Cell Format while pasting from another source

    Make a VBA code how your standard template should look like.
    Let this code automatically run (BeforeClose event) every time you close the file.

    Take a look at this simple example
    Copy H4:H6 in A4:A6 save the file and reopen.
    Attached Files Attached Files
    Last edited by popipipo; 04-24-2016 at 05:35 AM. Reason: add excel file
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  5. #5
    Registered User
    Join Date
    03-17-2016
    Location
    India
    MS-Off Ver
    2010
    Posts
    83

    Re: Protecting Cell Format while pasting from another source

    Thank you...

    Above file solved my thread.

    I will adjust the coding as per my requirements

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Protecting Cell Format while pasting from another source

    If you make a sheet with the standard layout and hide this sheet you can use a much shorter and i think faster code.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Protecting Cell Format but allowing cell data entry
    By telcocook in forum Excel General
    Replies: 3
    Last Post: 10-10-2014, 04:06 PM
  2. Protecting data validation from pasting in a shared workbook
    By egarla in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-18-2014, 03:53 PM
  3. Replies: 0
    Last Post: 03-20-2014, 10:03 AM
  4. Protecting formats when pasting in.
    By Stevie-B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2008, 05:53 AM
  5. Replies: 2
    Last Post: 07-14-2006, 01:20 AM
  6. [SOLVED] Protecting VBA source code
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2006, 11:34 AM
  7. copying and pasting from source sheet to destination sheet without naming source sht?
    By Simon Lloyd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2006, 01:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1