38

I have an Excel file which has a column formatted as date in the format dd-mm-YYYY.

I need to convert that field to text. If I change the field type excel converts it to a strange value (like 40603).

I tried the text function but it gives me Error 508.

Any help?

2
  • 1
    What do you mean convert to text? You want to have your date appear in a different format? (40603 is the number of days since 1900) Commented Apr 3, 2012 at 12:06
  • I need to concatenate that date with other text in a formula I have. But when i select the field where the date is in the formula it doesn´t put the date(23-04-2012) but the converted value. I want it to keep the date as string. Commented Apr 3, 2012 at 12:11

3 Answers 3

69

You don't need to convert the original entry - you can use TEXT function in the concatenation formula, e.g. with date in A1 use a formula like this

="Today is "&TEXT(A1,"dd-mm-yyyy")

You can change the "dd-mm-yyyy" part as required

Sign up to request clarification or add additional context in comments.

2 Comments

I got error501 when applying =TEXT(D2,"dd-mm-yyyy") where D2 as the value 18-03-2011 formatted as a date
I don't know what that error means - depending on your location you might need semi-colon in place of comma like ="Today is "&TEXT(A1;"dd-mm-yyyy") - and TEXT function is also region-specific so you need to use exactly the same format in the TEXT function as you would in your formatting
26

You can use TEXT like this as part of a concatenation

=TEXT(A1,"dd-mmm-yy") & " other string"

enter image description here

Comments

18

If that is one table and have nothing to do with this - the simplest solution can be copy&paste to notepad then copy&paste back to excel :P

2 Comments

just before pasting back to excel make the target cells formatted as text
Copy&Paste ... incredible! Thank you, you've saved me from throwing the pc out of the window!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.