Change Date Format to Specific Text Format When Copying


A

adambush4242

I have a certain cell that is used to input a date. I want to be able to
push a button and copy this date to antoher cell, however I need the
formatting to change from the original date format to a text format that goes
yyyy-mm-dd. I've tried using a custom format and then changing that to text
but the date just changes to a number. Any suggestions?

Thanks

Adam Bush
 
Ad

Advertisements

F

Franz Verga

Hi Adam,

I think you can use a formula to copy the datefrom the original input cell
to the destination cell. If for example your input cell is A1, in the
destination cell you can type the following formula:

=TEXT(A1,"yyyy-mm-dd")



Nel post:[email protected],
I have a certain cell that is used to input a date. I want to be
able to push a button and copy this date to antoher cell, however I
need the formatting to change from the original date format to a text
format that goes yyyy-mm-dd. I've tried using a custom format and
then changing that to text but the date just changes to a number.
Any suggestions?

Thanks

Adam Bush



--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 
A

adambush4242

Thanks for your help guys!

Franz Verga said:
Hi Adam,

I think you can use a formula to copy the datefrom the original input cell
to the destination cell. If for example your input cell is A1, in the
destination cell you can type the following formula:

=TEXT(A1,"yyyy-mm-dd")



Nel post:[email protected],




--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 
Ad

Advertisements

F

FSt1

hi
with the date in b2 and wanting to move it to e3 as text, something like
this might work.....
sub changetotext()
Range("E3").Formula = "=Text(B2, ""mm/dd/yyyy"")"
Range("E3").Copy
Range("E3").PasteSpecial xlPasteValues
end sub
this way it would work of a button.

regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top