Closed Thread
Results 1 to 8 of 8

retaining both cell formats when pasting on on other

  1. #1
    Registered User
    Join Date
    05-08-2006
    Posts
    76

    retaining both cell formats when pasting on on other

    Hi,
    I have a template A that has lines on it, sometimes I want to overlay template B which has other lines on it, however when I past template B on top of A the formats of A are overridden by the formats of template B.
    Is there any way of "overlaying" B on top of template A without losing the template A formats?

    Any help appreciated

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    This is the idea you're looking for to paste values only, you'll have to adapt it since you didn't provide sample sheets:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Another way to do it without selecting cells:
    Please Login or Register  to view this content.
    Just to be clear, the syntax here is [destination].value = [source].value

  4. #4
    Registered User
    Join Date
    05-08-2006
    Posts
    76

    not combining cell values but formats, specifically borders

    Sorry not the values but the formats, specifically the borders.
    I have made template pictures with borders, I want to paste one template on top of the other with the result of seeing the sum of the these borders.

    eg if cell 1 has right border black ...l and cell 2 has left border black l...
    then pasting the two needs to look like l...l

    Cheers

    Simon

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Simon,

    Can you post the workbook so we can see these the templates along with a sample picture?

    Sincerely,
    Leith Ross

  6. #6
    Registered User
    Join Date
    05-08-2006
    Posts
    76

    sample of spreadsheet

    I have made a sample to show you. In reality these templates are 26 columns wide and 130 rows.

    Thanks
    Simon
    Attached Files Attached Files

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello simonsmith,

    The following code will add the borders to the selected cells. But, I don't think this what you are really after. I sounds to me like you want to automate the process so the borders are added when pasting is done manually.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello simonsmith,

    I am closing this post because of your new requirements. This post has been solved.

    Sincerely,
    Leith Ross

Closed Thread

Thread Information

Users Browsing this Thread

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

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