+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    08-05-2009
    Location
    Fairfax, VA
    MS-Off Ver
    Excel 2007
    Posts
    9

    Question Help with formatting cells

    I am having trouble formatting cells in Excel 2007. I have a list of dates that I pulled from our database. When I right click, and choose format cells and how I want the date to appear, it is not accepting the formatting. I have tried to save the file as a .csv in hopes that the cells would change to the dd/mm/yyyy format that I need, but it is still not doing anything. Can anyone help with this issue?

  2. #2
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,212

    Re: Help with formatting cells

    Hi Kimmyh3, welcome to the forum.

    One thought is that the dates from your database are actually coming into Excel as Text and not as actual dates. Are they aligned to the left of the cell?

    Try this:
    Select your range of dates, then in the Cell Formatting screen choose a Date format.
    With the dates still selected, click the Data tab, then Text-to-Columns and click Finish.

    Hopefully that helps. If not, try uploading a sample workbook with any private data removed - we would likely only need to see the column with the dates in it.

  3. #3
    Registered User
    Join Date
    08-05-2009
    Location
    Fairfax, VA
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Help with formatting cells

    Thank you so much for the quick reply! After looking at my dates you were right being that the ones that will not format are not left aligned. I attached the file for you to see. (Could you please provide instructions on how to fix? I am not sure where the cell formatting screen is).
    Attached Files Attached Files

  4. #4
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,212

    Re: Help with formatting cells

    Hi Kimmy,

    Your data contains extra spacing and differently formatted "dates". Try this:

    Select column B
    Right-click any cell in column B and choose "Format Cells..."
    In the Format Cells dialog, select Custom from the category list; then beneath 'Type', enter: mm/dd/yyyy
    Click OK

    In B1 put the following formula:

    =IF(ISNUMBER(FIND("-",A1)),TRIM(MID(A1,2,LEN(A1))),A1)

    After doing that, hover over the lower right corner of cell B1 until the cursor becomes a + sign. Once it's a + sign, double-click and it will automatically fill that formula down to the last used row (2291) in the adjacent column (A).

    Select Column B, right-click selection and choose Copy
    Right-click selection again and choose PasteSpecial, then choose Values and click OK
    Press ESC

    Select Column B, then on the Data ribbon click 'Text to Columns' and then click Finish when the Text To Columns dialog displays.

    You can then delete column A's "fake" dates.

    Hopefully you can follow along. If not, let us know!

  5. #5
    Registered User
    Join Date
    08-05-2009
    Location
    Fairfax, VA
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Help with formatting cells

    Thanks! I will try this and will let you know how it works!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0