+ Reply to Thread
Results 1 to 5 of 5

Transform / Replace command

  1. #1
    Registered User
    Join Date
    08-18-2008
    Location
    Los Angeles
    Posts
    44

    Transform / Replace command

    Is there a ATransform or replace command in Excel. i have a value of 04/23/09 which is a date and would like to replace all "/" with "-' thereby making the value 04-23-09. I could examine each character value within a cell but this would just make a long coding and would like to know if there's a shorter way to do this?.
    Last edited by teachMeExcel; 05-07-2009 at 10:58 AM. Reason: closing down

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transform / Replace command

    If it's ACTUALLY a date, you can simply highlight the entire column of Date values and press CTRL-1 to open the format cells box, select CUSTOM and for the TYPE, enter:

    mm-dd-yy


    If it's not really a date, if it's text data, then highlight the entire data set, press CTRL-H to open the Search/Replace and fill out the fields appropriately...then REPLACE ALL.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Transform / Replace command

    Is 04/23/09 a date? If it were in A1, then =A1+1 should show as the 24th. If not, they it is not a data but a string. In other words, dates are numbers not text strings like 04/23/09.

    If it is a numeric format, then a macro could fix your numeric formats for you. If it is a text string, an =Replace() would do the trick.

  4. #4
    Registered User
    Join Date
    08-18-2008
    Location
    Los Angeles
    Posts
    44

    Re: Transform / Replace command

    All, Thanks for the Help. It works like wonders in Macro. Problem SOLVED.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transform / Replace command

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

+ 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