+ Reply to Thread
Results 1 to 2 of 2

Formatting Cells in Excel

  1. #1
    Registered User
    Join Date
    12-10-2011
    Location
    Gunnison, CO
    MS-Off Ver
    Excel 2007
    Posts
    1

    Formatting Cells in Excel

    Is there a way to check the formatting of a cell and then depending on the format, format the referenced cell from an if statement?

    What I have is a cell in a collumn that has a 24 hour time format and the cell below it may or may not have a 24 hour time format in a text format. Can I determine which I have so that I can then turn around and format the referenced cell from an if statement to be the same as what the original cell was found to be?

    Thanks for your help!

  2. #2
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Formatting Cells in Excel

    This will get you part of what your looking for.

    Check the =CELL() function with "format".

    It will return a D value: D1, D2, D3, D4, D5
    if the cell is formatted as a DATE or the letter G if it's General Format.

    =CELL("format",A1)
    Last edited by xenixman; 12-11-2011 at 12:07 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.6.0 RC 1