Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default rearrange values in cell to date

uploaded cell values in column B show as

2009-04-11*

(does not read as a date)

Need code that will check to see if any value as above exist in column
B, if so change order to format that reads as a date.

04/11/2009



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default rearrange values in cell to date

In what way is it "not a date"... does it have an apostrophe in front of it
(look in the Formula Bar, not the cell, to see it this is the case) or is
the cell formatted as Text?

--
Rick (MVP - Excel)


"J.W. Aldridge" wrote in message
...
uploaded cell values in column B show as

2009-04-11

(does not read as a date)

Need code that will check to see if any value as above exist in column
B, if so change order to format that reads as a date.

04/11/2009



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 515
Default rearrange values in cell to date

Most likely your cells have been formatted as text. Reformat as General.
Now press <F2, and then press <Enter That should change it to dd-mm-yyyy,
provided that is how your date format has been set. It might also change it
to dd/mm/yyyy, but it would still be a date.

--
HTH

Kassie

Replace xxx with hotmail


"J.W. Aldridge" wrote:

uploaded cell values in column B show as

2009-04-11

(does not read as a date)

Need code that will check to see if any value as above exist in column
B, if so change order to format that reads as a date.

04/11/2009




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default rearrange values in cell to date

kept digging to find out problem...

found out there's a trailing space at the end of 2009-04-11 which
prevents it from being read as date or even changed into. I tried
several vba codes to remove trailing spaces, but for some reason that
doesnt work either. I download the data in its current format so I'm
guessing its reading as one object somehow? These numbers are all in
one column/string. Any suggestions would be appreciated.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default rearrange values in cell to date

You didn't answer the questions I asked you in my other post, but based on
what you have said, I'm guessing the cells are formatted as text. If that is
the case, the try this... select your column of dates, click
Data/TextToColumns on Excel's menu bar and click the Finish button on the
dialog box that appears. Doing this should change any of your "text dates",
with or without trailing spaces, to real dates that you can then format as
you wish.

--
Rick (MVP - Excel)


"J.W. Aldridge" wrote in message
...
kept digging to find out problem...

found out there's a trailing space at the end of 2009-04-11 which
prevents it from being read as date or even changed into. I tried
several vba codes to remove trailing spaces, but for some reason that
doesnt work either. I download the data in its current format so I'm
guessing its reading as one object somehow? These numbers are all in
one column/string. Any suggestions would be appreciated.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 515
Default rearrange values in cell to date

Stay away from the VBA my friend. try =TRIM(Cell reference). However, this
should not prevent it from being seen as a date. It is beginning to sound to
me as if you import this data via a csv or txt file. Iow, it is seen as
text. If so, save as a .xls, then format the cells as General, <F2 and
<Enter on a cell to see what happens.
--
HTH

Kassie

Replace xxx with hotmail


"J.W. Aldridge" wrote:

kept digging to find out problem...

found out there's a trailing space at the end of 2009-04-11 which
prevents it from being read as date or even changed into. I tried
several vba codes to remove trailing spaces, but for some reason that
doesnt work either. I download the data in its current format so I'm
guessing its reading as one object somehow? These numbers are all in
one column/string. Any suggestions would be appreciated.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
rearrange texts and values in new column pandurangshinde Excel Discussion (Misc queries) 1 August 5th 09 06:35 AM
Create a formula to rearrange different values in groups Raymond L[_2_] Excel Discussion (Misc queries) 2 April 28th 08 12:33 AM
rearrange date tuanvcb Excel Discussion (Misc queries) 1 February 13th 08 05:08 PM
help me on rearrange cells based on its numerical values without repeating any number amrezzat[_14_] Excel Programming 3 November 22nd 05 05:20 PM
help me on rearrange cells based on its numerical values without repeating any number amrezzat Excel Worksheet Functions 0 November 21st 05 11:01 PM


All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"