Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cannot change column format (Excel 2003)

    I have a file that I bring into Excel from a SAS program. When I open the file, I cannot change a column format. I highlight the column (a date column) and it won't change to a different format.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Cannot change column format (Excel 2003)

    This probably means that the dates are stored as text values instead of as real date values. Try the following:
    - Select the column.
    - Select Format | Cells and set a date format. It won't be applied yet!
    - Press Alt+F11 to activate the Visual Basic Editor.
    - Press Ctrl+G to activate the Immediate window.
    - Type Selection.Value = Selection.Value and press Enter.
    - Switch back to Excel.
    - Adjust the column width if necessary.

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cannot change column format (Excel 2003)

    As Hans has already said, the dates were probably stored as Text values. Another way to change them into dates without having to use the VBA editor is:

    1- Change the cell format to General.

    2- Select any empty cell in the worksheet and do an Edit/Copy to copy the empty cell.

    3- Select the cells containing the dates and then select Paste Special from the Edit menu.

    4- In the Paste Special dialog box click on Add in the Operation section to put a tick mark next to it.

    5- Click on OK.

    6- Format the cells to the date format that you want.
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •