+ Reply to Thread
Results 1 to 6 of 6

Fixing formatting of a cell

  1. #1
    Registered User
    Join Date
    05-20-2021
    Location
    Finland
    MS-Off Ver
    Office18
    Posts
    18

    Fixing formatting of a cell

    Hi,

    I have a problem regarding the formatting of my cells. I have values in the form of 01.02.2020 08.00.07 in 1500 cells. How can I change all of these into 01.02.2020 08:00:07?

    Thanks!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: Fixing formatting of a cell

    Assuming that is in A2, you can use this formula in B2:

    =LEFT(A2,11)&SUBSTITUTE(RIGHT(A2,8),".",":")

    and copy down as required. Note that it is a text value.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    05-20-2021
    Location
    Finland
    MS-Off Ver
    Office18
    Posts
    18

    Re: Fixing formatting of a cell

    Thanks for your reply! Now the text formatting is kinda problematic because I need to count with these. Sorry for not mentioning this earlier.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Fixing formatting of a cell

    =(SUBSTITUTE(LEFT(A2,11),".","/")&SUBSTITUTE(RIGHT(A2,8),".",":"))*1 may work or

    =DATEVALUE((SUBSTITUTE(LEFT(A2,11),".","/")))+TIMEVALUE(SUBSTITUTE(RIGHT(A2,8),".",":"))

    however as we can not see any sample data to see if there are inconsistencies in the data. I think you are also wanting to change the underlying value so it becomes date time, which isn't the format. It goes without saying the column needs to be formed as dd/mm/yyyy hh:mm:ss to display as you wish
    Last edited by davsth; 10-18-2021 at 05:48 AM.

  5. #5
    Registered User
    Join Date
    05-20-2021
    Location
    Finland
    MS-Off Ver
    Office18
    Posts
    18

    Re: Fixing formatting of a cell

    Hi! My data has no inconsistencies. I used the first function and it works, but it displays only the time. That is okay though so its fine. Thanks!

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Fixing formatting of a cell

    what have you formatted it as ? dd/mm/yyyy or dd/mm/yyyy hh:mm:ss

+ 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. Fixing A Cell Value
    By yawget in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2021, 09:11 AM
  2. [SOLVED] Fixing HTML formatting
    By erikpaulsen in forum Excel General
    Replies: 0
    Last Post: 02-05-2016, 09:41 PM
  3. [SOLVED] Cell fixing
    By mahershams in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-19-2013, 10:22 AM
  4. [SOLVED] Fixing conditional formatting
    By gtaaccord in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-08-2013, 10:57 AM
  5. Fixing Date Formatting.
    By Actionhank1786 in forum Excel General
    Replies: 4
    Last Post: 07-17-2013, 12:06 PM
  6. Fixing Cell values
    By Chutney in forum Excel General
    Replies: 1
    Last Post: 10-12-2010, 05:59 PM
  7. [SOLVED] `fixing“ a cell
    By [email protected] in forum Excel General
    Replies: 9
    Last Post: 03-02-2006, 02:25 PM

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