![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#11
|
|||
|
|||
|
Quote:
|
| Ads |
|
#12
|
|||
|
|||
|
"ExcelSavior" > wrote:
> I have used the =DATE(2000+DAY(A1),MONTH(A1),1) formula > and got what I wanted to work. The problem is now I need > the date to show as a date in text format, i.e. 201301 > needs to be 201301 when changed to text format, not the > weird coding for dates that Excel defaults to. Is there > any way to fix this? I don't know what "weird coding" you are referring to. You can format the cell(s) or column any way you wish. In this case, it appears that you want the Custom format yyyymm. Select the cell(s) or column, right-click and click on Format Cells, then the Number tab, then Custom. Enter yyyymm into the Type field, and click on OK. However, the date will remain numeric, not literally text. I suspect that it is what you meant. But if you truly want text -- that ISTEXT(B1) should return TRUE -- you can do the following: =TEXT(DATE(2000+DAY(A1),MONTH(A1),1),"yyyymm") |
|
#13
|
|||
|
|||
|
On Wed, 8 Aug 2012 00:00:26 -0700, "joeu2004" > wrote:
>And what is the benefit of that over either of my previous suggestions, to >wit: > >For text date: >=--(MID(A1,1+FIND("-",A1),99) & " 1, " & LEFT(A1,2)) > >For numeric date: >=--(MONTH(A1) & "/1/" & DAY(A1)) As you had originally posted at the time I downloaded the NG: =IF(ISTEXT(A1),--(MID(A1,1+FIND("-",A1),99) & " 1, " & LEFT(A1,2)), DATE(DAY(A1),MONTH(A1),1)) I offered another approach, which obviated the need to first determine if the data being processed is text or not. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| permanent conversion of 1904 date format to 1900 date format | Jos | Excel Worksheet Functions | 3 | July 21st 09 06:32 PM |
| convert serial date format to normal date format | Flagworld | Excel Discussion (Misc queries) | 3 | September 23rd 08 01:32 PM |
| Convert date + time text format to date format | Paul Ho | Excel Worksheet Functions | 2 | May 22nd 07 05:47 PM |
| code to convert date from TEXT format (03-02) to DATE format (200203) | Gauthier[_2_] | Excel Programming | 0 | September 22nd 04 03:26 PM |
| Change a date in text format xx.xx.20xx to a recognised date format | concatenator | Excel Programming | 1 | November 24th 03 11:33 PM |