This will not give you the magic answer, but it can quickly get the answer without any VBA.
1) Insert a blank line at the top of the document
2) In cell A1, enter the following formula:
=CELL("width", A1)
3) Apply the formula to all other columns by dragging the A1 slim-black-crosshair (it appears when you hover in the lower right corner of your cell).
What you get is a rounded pixel value for each column width. Then simply select the cells in the first row for all the columns you want to add, and look at the bottom of the Excel window. You should see the sum of your values as you select. For example, if you want to sum the widths of columns A, B, and D, select A1 CTRL + press B1 and CTRL + press D1. In the lower right corner you will see their total width.
Hope this helps.
source share