+ Reply to Thread
Results 1 to 15 of 15

Delete column issue

  1. #1
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Delete column issue

    I can't seem to be able to delete columns with any effect. I only use columns A:Q on a sheet, but excel thinks I'm using A:XFD

    I have tried.

    A) Selecting all columns from S:XFD and deleting them. This just brings in new columns (which should be blank) but contain some border and background formatting matching for the first 5 rows.

    B) Selecting all columns from S:XFD and clearing all. Then deleting them.

    C) Clearing contents, going to VBA immediate window and typing Activesheet.usedrange - to try and reset the used range

    In all three cases if I use the immediate VBA window, it reports the used range to still be 6:186, i.e. all columns are still part of the used range (even if deleted and cleared).


    Any ideas please?

    thanks, Dom

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,755

    Re: Delete column issue

    Do you have any conditional formatting that uses whole row references?

  3. #3
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Delete column issue

    Good idea but no: Did have one rule but just deleted it. Then tried re deleting and same thing happens.

    I do think it's something to do with formatting as all the columns deleted reappear with certain cells bordered and coloured. But I'm not sure why that would survive clear contents all and delete

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,755

    Re: Delete column issue

    Any worksheet or workbook event code, that adds formatting?

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,755

    Re: Delete column issue

    Another check, if you do Ctrl End where does that take you?

  6. #6
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Delete column issue

    Lots of code but not really to do with that sheet.

    This is getting more bizarre. After I cleared contents. I saved - and the file had gone from 5mb to 25mb.

    I went back and deleted columns again - and it goes back down to 5mb, but on the screen it looks like.

    Now when I type usedrange it gives $A$1:$R$696 - even though it looks like there is this blue formatting in all the columns to the right.

    Screenshot 2018-12-15 at 19.03.44.jpg

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,755

    Re: Delete column issue

    If you copy that sheet to a new workbook, do you still get the same thing?
    If so can you upload that file?

  8. #8
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Delete column issue

    Thanks for help.
    Yes if I copy sheet to a new file - it still has same behaviour

    The uplink icon doesn't seem to be working.
    Will keep trying

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,755

    Re: Delete column issue

    The paper clip icon doesn't work at the moment.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  10. #10
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Delete column issue

    Yep I've managed to upload with go advanced / manage - but how do I insert into message?

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,755

    Re: Delete column issue

    In the upload manager window
    Click "Browse" & select your file
    Then click "Upload"
    Then click "Close this window"
    and finally click "Submit Reply"

  12. #12
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Delete column issue

    ok hopefully this adds the attachment
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,755

    Re: Delete column issue

    Thanks for the file.
    It looks as though there is a style in place on those cells.
    If you select col S:XFD & set style to normal then set borders to no borders.
    All should be well.

  14. #14
    Registered User
    Join Date
    08-25-2017
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Delete column issue

    Great thx - that's sorted it. I was convinced it was corrupted so glad it's not. Must be a bit of an anomaly that delete and clear contents don't remove the styles.

    Anyway great help. many thx

  15. #15
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,755

    Re: Delete column issue

    Glad to help & thanks for the feedback

+ 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] VBA Outlook Delete Issue
    By chungiemo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2018, 06:10 AM
  2. [SOLVED] Find - Array - Delete Row Issue
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2014, 09:07 AM
  3. [SOLVED] Do - Loop (Sheet Delete Issue)
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-08-2014, 03:45 PM
  4. Multilple selection delete issue
    By kmakjop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2012, 01:47 PM
  5. Macro to delete certain columns and delete rows based on time in another column
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2012, 11:47 AM
  6. Sort Column, Delete Rows, Delete Column, Move Molumn, more inside?
    By motown in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-13-2008, 09:44 AM
  7. [SOLVED] ISSUE: Using VBA to Delete a Column
    By cincode5 in forum Excel General
    Replies: 2
    Last Post: 01-26-2005, 10:07 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