Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot delete a column that contains multiple tables

Tags:

excel

vba

Whenever I have two tables in the same column, I get this error.

enter image description here

  1. Create a table in columns (ie B1:C3)
  2. Create another table below that table (ie B5:C7)
  3. Right-click on column B
    • Is the "Delete" option grayed out (unavailable)?
  4. Convert the second table (B5:C7) back to a normal area
  5. Right-click on column B
    • Is the "Delete" option active (black) now?

It is for me.

I don't understand why it happens but I'd really appreciate if someone could confirm that I'm not alone on this one. This actually seems like a bug.

like image 220
TAKL Avatar asked Feb 04 '26 21:02

TAKL


1 Answers

Unfortunately this is 'behavior by design'. A ListObject (aka structured ) table has many internal mechanisms. The Delete (column) command is not designed to enumerate through all of the ListObjects on the worksheet to see if any intersect with the column being deleted and then spawn subprocesses that deal with deleting table columns specifically while simultaneously keeping in mind how that will affect other ListObject tables. Instead, it simply does not allow the Delete command when more than a single ListObject table is involved.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!