Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Rows & Columns > Advanced Techniques< Previous | Next > 

 

Displaying the Column Width in a cell

 
 

You can easily check the widths of your columns by displaying them in the first row of your worksheet.

 
 

It is possible to create a named formula that can display the width of the column enabling the widths to be easily checked without moving the mouse and checking them all one by one.

 
   

 

Column Letters to Number Reference

 
 

This reference table is handy when you are using large Lookup tables

 
 
ColNo.ColNo.ColNo.ColNo.ColNo.ColNo.ColNo.ColNo.ColNo.ColNo.
A1L12W23AH34AS45BD56BO67BZ78CK89CV100
B2M13X24AI35AT46BE57BP68CA79CL90CW101
C3N14Y25AJ36AU47BF58BQ69CB80CM91CX102
D4O15Z26AK37AV48BG59BR70CC81CN92CY103
E5P16AA27AL38AW49BH60BS71CD82CO93CZ104
F6Q17AB28AM39AX50BI61BT72CE83CP94DA105
G7R18AC29AN40AY51BJ62BU73CF84CQ95DB106
H8S19AD30AO41AZ52BK63BV74CG85CR96DC107
I9T20AE31AP42BA53BL64BW75CH86CS97DD108
J10U21AF32AQ43BB54BM65BX76CI87CT98DE109
K11V22AG33AR44BC55BN66BY77CJ88CU99DF110
 

 

Filling In Blank cells between unique entries

 
 

Select the cells A1:A10

 
 

(Edit > GoTo) Click Special and select blanks.

 
 

Type "=a1" and press (Ctrl + Enter)

 

 

Select the cells A1:A10

 
 

(Edit > Copy)

 
 

(Edit > Paste Special) Click Special and select values

 

 

Sometimes cells are not wide enough to display the values. In this case the cell displays ####. You can check for these by checking the Value property of the cell is numeric and that the first character of the left of the text property is equal to “#”.

 

 

Proportional and Non Proportional Fonts

 
 

If the default font is a non-proportional (fixed width) font, such as Courier, 8.43 characters of any type (numbers or letters) fit into a cell with a column width of 8.43 because all Courier characters are the same width.

 
 

If the font is a proportional font, such as Arial, 8.43 integers (numbers such as 0, 1, 2, and so on) fit into a cell with column width of 8.43.

 
 

This is because numbers are fixed-spaced with most proportional fonts.

 
 

However, because letters are not fixed-spaced with proportional fonts, more "i" characters fit and fewer "w" characters fit.

 
 

When you change the width of a column to a fractional number, the column width may be set to a different number depending on the font used in the Normal style.

 
 

For example, with a Normal style font of Arial, if you attempt to change the width of a column to 8.5, the column is set to 8.57 or 65 pixels.

 
 

This behavior occurs because of the translation of font characters to pixel units.

 
 

Fractional pixel units cannot be displayed; therefore, the column width rounds to the nearest number that results in a whole pixel unit.

 

 

Pixels to Inches

 
 

If you want to know wxactly how large something on a worksheet will be when it is printed you need to be able to convert inches into pixels

 
 

Pixels to Inches: inches = pixels / dots per inch.

 
 

Inches to Pixels: pixels = inches * dots per inch.

 
 

You can obtain your DPI number from your Control Panel > Display settings.

 
 

The exact number will depend on which driver you have installed but selecting the Settings tab and pressing the Advanced button will give you more information about your current driver.

 
 

A typical DPI is 96.

 

 

Pasting Column Widths

 
 

When you Copy and Paste cells in Excel (Ctrl-C, Ctrl-V) you can't automatically paste in the column widths that accommodate that data. But, you can paste in the column width by using Paste Special.

 
 

After using a normal Paste to paste in the data and cell formats, right-click the new range of data you just pasted, choose Paste Special, and select the Column Widths radio button.

 



 Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.< Previous | Top | Next >