+ Reply to Thread
Results 1 to 12 of 12

Retaining the Align Centre in cells that have information cut from them

  1. #1
    Registered User
    Join Date
    04-30-2012
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    88

    Retaining the Align Centre in cells that have information cut from them

    Hi there

    I have one specific sheet that I need to retain the Align Central format in even if information is cut from.

    At the moment they are aligned centrally, but when I cut information it reverts to aligning left.

    Does anyone have any idea for how to do this in one sheet only?

    Thanks in advance for your help.

    Steve

    Cross posted - http://www.mrexcel.com/forum/excel-q...ml#post3641581

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Retaining the Align Centre in cells that have information cut from them

    Assuming that we are taliking about column C, this one will do what you want.
    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Retaining the Align Centre in cells that have information cut from them

    Instead of using cut and paste, use copy and paste then delete the contents of the source cell.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Retaining the Align Centre in cells that have information cut from them

    Or you could take Fotis's recorded macro and edit it down.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-30-2012
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    88

    Re: Retaining the Align Centre in cells that have information cut from them

    Hi Tim and Fotis, thanks for the solutions, very much appreciated. Apologies for being unclear, but what I'm hoping to be able to do is set that specific sheet up so that everything is aligned centrally when it's opened and there is no possibility of a user taking an action that will allow that to be changed, but they can still input, delete, cut, copy and paste information in and out of the cell.

    Thanks for your continued help

    Steve

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Retaining the Align Centre in cells that have information cut from them

    If you "cut" a cell, then it will remove not only the contents (value or formula) but also the formatting of the cell, Conditional Formatting and Data Validation. Equally, if you paste a cut cell somewhere else, it will take all the original cell's properties with it.

    I'm not sure how you can maintain the integrity of the worksheet if people can cut and paste as they wish.

    If you want to copy the cell, you should use Copy and Paste, then Delete, rather than Cut. If you want to paste a cell, use Paste Values or Formula.

    If you want a VBA solution, you could have, say, a Selection Change event which centres the contents of the cell when it is selected.

    Please Login or Register  to view this content.
    Regards, TMS

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Retaining the Align Centre in cells that have information cut from them

    Perhaps using a Worksheet event. Something like this...
    Please Login or Register  to view this content.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Retaining the Align Centre in cells that have information cut from them

    Sorry, I enjoy interfering, sorry (again), tinkering with Fotis's code.

    Could be:

    Please Login or Register  to view this content.

    You could remove the commented lines if you don't want/need to apply that formatting.

    Regards, TMS
    Last edited by TMS; 11-22-2013 at 07:03 AM. Reason: Slight modification to code

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Retaining the Align Centre in cells that have information cut from them

    Quote Originally Posted by TMShucks View Post
    Sorry, I enjoy interfering, sorry (again), tinkering with Fotis's code.
    Regards, TMS
    I enjoy to see you to do this Trevor!

  10. #10
    Registered User
    Join Date
    04-30-2012
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    88

    Re: Retaining the Align Centre in cells that have information cut from them

    Great, thanks for the combined effort guys, really appreciate your help

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Retaining the Align Centre in cells that have information cut from them

    You are welcome and thanks for the feedback & rep.

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Retaining the Align Centre in cells that have information cut from them

    Ditto. You're welcome. Thanks for the rep.


    Just out of interest, what did you decide to do in the end? TMS

+ 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. Align matching information from several colulmns
    By Shelsey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-05-2013, 07:39 PM
  2. Excel 2007 : labels using align and centre
    By davebt in forum Excel General
    Replies: 5
    Last Post: 11-01-2011, 03:34 PM
  3. How do I Centre Align an Overlaying Picture on a Cell? Not Manually!
    By e4excel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-25-2011, 10:00 AM
  4. align numbers in a column to centre
    By arashin in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-20-2010, 12:50 PM
  5. Splitting columns by , and retaining orginal row information
    By tjquinn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-22-2008, 08:11 PM

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