+ Reply to Thread
Results 1 to 4 of 4

How to replace a cells value with the result of its formatting

  1. #1
    Registered User
    Join Date
    04-13-2015
    Location
    QUEENSLAND, AUSTRALIA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Exclamation How to replace a cells value with the result of its formatting

    I have formatted cells as dd/mm/yyyy. However this does not mean the cell value itself changes, it is merely the formatting. How can I turn this formatting into the cell value itself?

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,835

    Re: How to replace a cells value with the result of its formatting

    To convert a "date" serial to a text string, you can use the =TEXT() function: https://support.office.com/en-us/art...8-93d29371225c Something like =TEXT(a1,"dd.mm/yyyy") should do what you want.

    Recognize that this will turn the date into a text string, which can create issues if you need to use this in further calculations, so I generally recommend that this only be used on values that will not be used in other calculations.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: How to replace a cells value with the result of its formatting

    Not sure I fully understand your question?

    Formatting ONLY changes the appearance of a cell, not it's contents. If you have what looks like a date in a cell, and formatting it does not change how it looks, chances are, that is not really a date, but text that looks like a date. Test with =ISNUMBER(Cell-Ref) FALSE indicates TEXT, while dates are actually numerical values
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    04-13-2015
    Location
    QUEENSLAND, AUSTRALIA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: How to replace a cells value with the result of its formatting

    PERFECT! Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 05-08-2015, 12:08 PM
  2. Find/Replace macro not working on all relevant cells.. Hidden formatting?
    By heather1209 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-27-2012, 09:24 AM
  3. Replies: 8
    Last Post: 03-03-2011, 03:28 PM
  4. [SOLVED] Can a conditional formatting result affect another cell or cells
    By marseans in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-23-2005, 02:20 PM
  5. [SOLVED] conditional formatting based on another cells formula result
    By kstarkey in forum Excel General
    Replies: 3
    Last Post: 10-05-2005, 05:05 PM

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