+ Reply to Thread
Results 1 to 3 of 3

delete new column without deleting heading

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    delete new column without deleting heading

    Hi,

    I am trying to include a button in a spreadsheet that deletes a column. My issue is that when I do it may delete the heading in row 3. I have the headings set to 'centre across selection' but if I delete the column on the left side of a section (e.g. column J) the heading also gets deleted. Is there code to get around this? If it was only me working on it I would just do it manually but with others using it I would like it to delete the column and but keep the heading automatically after pressing the button.

    I have included the spreadsheet so you can see what I mean.

    Thanks
    Attached Files Attached Files

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

    Re: delete new column without deleting heading

    Hello littlesimon,

    If you delete an entire column then its header will be deleted also. You can delete the values and formulas in the column without removing the header. Is that what you want to do?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    Re: delete new column without deleting heading

    Hi Leith,

    Thanks for the reply.

    No it is so that someone can delete a column by pressing the button. The problem is that the heading in J3 is centred across the selection J3:R3 being 'Term 2' and if J is deleted it deletes the heading for that whole section.

+ 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. Delete a column based on a heading cell value and loop
    By hassan88 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-03-2015, 07:42 AM
  2. [SOLVED] Delete Column if first cell does not equal correct heading
    By Justair07 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-20-2013, 09:23 AM
  3. [SOLVED] Delete columns based upon a column heading?
    By Bandicoot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2013, 10:02 AM
  4. [SOLVED] In a table produce an value by column heading and row heading
    By naflan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-27-2005, 01:25 PM
  5. delete column heading for print
    By Daffy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-10-2005, 03:40 PM
  6. [SOLVED] Deleting Columns Based upon Heading
    By Jessica in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-03-2005, 07:10 PM
  7. Find Column heading and then Delete entire column
    By Kobayashi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-17-2005, 05:05 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