Delete columns within a table using number reference not letter reference

yxz152830

Active Member
Joined
Oct 6, 2021
Messages
393
Office Version
  1. 365
Platform
  1. Windows
Gurus,
below code is what I learnt prior for multiple columns manipulation within a table:
VBA Code:
Sheets("a").ListObjects("abc").Range.Columns("A:B").Select
now the thing is that I need to locate a specific cell in a table and delete all the columns left of the cell.
Currently Im using .find. column to find out the number of columns.
Since .find.column renders an absolute number of columns based off the specific cell, I have encountered 2 problems:
1. What I learnt uses letter reference for columns. How do I 'convert' the column number to letters or is there an alternative approach?
2. if I want to keep the columns to the left outside of the table, how do I do it if .find.column emits an absolute column number?

Right now my solution is to loop .columns(1).delete for find.column times
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,215,008
Messages
6,122,672
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top