+ Reply to Thread
Results 1 to 7 of 7

Re formatting Dates problem

  1. #1
    Forum Contributor
    Join Date
    06-09-2009
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    155

    Re formatting Dates problem

    Hi

    I have a column full of dates copied and pasted in the folowing format;

    Jun 30, 2010 10:18 AM

    Basically all I want to retrieve in another cell is simply the hour value i.e. 10 and the same running down the column.

    I have tried with numerous attempts to reformat, even to cut it down in size slowly etc, but the closest I have got today has been to get the last value in the column to change but the rest remain the same???

    I really need a fresh set of eyes to point out the problem here...

    any help gratefully received...
    Last edited by opsman; 07-07-2010 at 05:39 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Re formatting Dates problem

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    06-09-2009
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    155

    Re: Re formatting Dates problem

    Book 1 attached....

    One other issue I have just noted is that the times may need to be in another column first in a 24 hour format, before I can take it down to the single hour? The result will be "somewhere" in an adjacent column but not really before column BW.
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Re formatting Dates problem

    In your sample file (given UK locale) it would be done using:

    =HOUR(SUBSTITUTE(REPLACE(E8,1,4,""),","," "&LEFT(E8,3)))

    however - I suspect you need to adjust based on the fact this string could be located in various places - I'm not quite sure what you mean by that to be honest (ie workflow)
    Last edited by DonkeyOte; 07-07-2010 at 04:44 AM.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Re formatting Dates problem

    edit - of course if you need only the time....

    =HOUR(REPLACE(E8,1,12,""))

    (doh)

  6. #6
    Registered User
    Join Date
    07-02-2010
    Location
    Durban, SA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Unhappy Re: help with conditonal format involving date

    Hi all

    I have the following convoluted problem:

    I have a cell with a "Date of Manufacture" value in it eg: 1991. This is a static value. This value will not be edited to change.

    In another cell on the same row, I require that the colour of the cell changes to yellow when the age of the static cell is 2 years from becoming 5 years old.
    In the same cell, I require that the colour of the cell changes from yellow to orange when the age of the static cell is 1 year from becoming 5 years old.
    In the same cell, I require that the colour of the cell changes from orange to red when the age of the static cell becomes 5 years old.
    I then require the static cell (red) to change from red to clear when the 5th year changes to 6 years.
    I now need the process to repeat itself every 5 years till it reaches an expiry date of 40 years i.e. 10,15,20,25,30,35,40.

    Can any genius help...pleeez!

  7. #7
    Forum Contributor
    Join Date
    06-09-2009
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    155

    Re: Re formatting Dates problem

    Quote Originally Posted by DonkeyOte View Post
    edit - of course if you need only the time....

    =HOUR(REPLACE(E8,1,12,""))

    (doh)
    Beautiful!

    Thanks....

+ 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