+ Reply to Thread
Results 1 to 5 of 5

Change cell format/value based on the value of another cell (time format transformation)

  1. #1
    Registered User
    Join Date
    10-05-2017
    Location
    Bucuresti, Romania
    MS-Off Ver
    Office 2013
    Posts
    3

    Change cell format/value based on the value of another cell (time format transformation)

    Hello guys,

    I'm new on this forum and I need some expert help.

    I have a spreadsheet with values on A_column and I need those changed to a different format.

    For example:

    A_column = B_column

    30.08(14:23) = 300820171423
    01.09(07:22) = 010920170722
    05.09(07:50) = 050920170750
    07.09(07:19) = 070920170719
    08.09(12:13) = 080920171213
    10.09(13:17) = 100920171317
    11.09(08:36) = 110920170836
    12.09(12:49) = 120920171249
    13.09(08:30) = 130920170830
    14.09(15:31) =
    18.09(16:00) =
    19.09(08:00) =
    20.09(09:07) =
    21.09(12:43) =

    I need a formula to change A values to B values.

    Basically, those are dates:
    A = dd.mm(hh:mm) (A column format is set to General)
    B = ddmmyyyyhhmm

    Does anyone have a clue for my problem?

    Thank you,
    Leo

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,085

    Re: Change cell format/value based on the value of another cell (time format transformatio

    column A
    are the first 5 characters always just 5 characters and always 2 char decimal 2 char and will it always be 2017 - or how is the year known

    =left(a1,5)*100
    the add the year

    =left(a1,5)*100&"2017"
    then ADD
    =MID(A1,7,2)&MID(A1,10,2)


    =left(a1,5)*100&"2017"&MID(A1,7,2)&MID(A1,10,2)
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Change cell format/value based on the value of another cell (time format transformatio

    May be
    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"(","2017"),".",""),":",""),")","")

  4. #4
    Registered User
    Join Date
    10-05-2017
    Location
    Bucuresti, Romania
    MS-Off Ver
    Office 2013
    Posts
    3
    Quote Originally Posted by gondal View Post
    May be
    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"(","2017"),".",""),":",""),")","")

    This one works. Thank you so much!!

  5. #5
    Registered User
    Join Date
    10-05-2017
    Location
    Bucuresti, Romania
    MS-Off Ver
    Office 2013
    Posts
    3
    Quote Originally Posted by etaf View Post
    column A
    are the first 5 characters always just 5 characters and always 2 char decimal 2 char and will it always be 2017 - or how is the year known

    =left(a1,5)*100
    the add the year

    =left(a1,5)*100&"2017"
    then ADD
    =MID(A1,7,2)&MID(A1,10,2)


    =left(a1,5)*100&"2017"&MID(A1,7,2)&MID(A1,10,2)
    Doesn't work, but 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. [SOLVED] change format based on value of cell
    By keith740 in forum Excel General
    Replies: 6
    Last Post: 05-28-2015, 06:35 PM
  2. Replies: 3
    Last Post: 02-24-2015, 02:58 AM
  3. Replies: 1
    Last Post: 07-03-2014, 06:33 AM
  4. [SOLVED] Change cell format based on cell value
    By LewisM in forum Excel General
    Replies: 6
    Last Post: 11-27-2013, 02:29 PM
  5. Change format of lots of data cell to a time format
    By dazza67 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-24-2013, 03:24 PM
  6. Change cell's number format based on another cell's value
    By Sharpshooter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-04-2010, 05:06 AM
  7. Change cell format based on another cell
    By Kearse56 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2007, 09:01 AM

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