VBA no puede establecer el formato de fecha en la columna

i'm trying to change column format from "Custom" to "Date" by

Columns("F:F").Select
Selection.NumberFormat = "Date"

but it set's F column's format just to another Custom, and for example

05 / 16

se convierte en

1at2016

¿Podrías ayudarme?

preguntado el 02 de febrero de 12 a las 10:02

There is no need to select cells to work with them. Adjusting @Romi's answer: Columns("F:F").NumberFormat = "mm/dd" -

1 Respuestas

Selection.NumberFormat = "mm/dd"

Eso debería hacer el truco.

Respondido 02 Feb 12, 15:02

I've tried that way but the problem is that external cells are changing but the content stays the same. by clicking on "05/16" cell, "01.05.2016" can be seen in formula bar.. so that looks like I haven't changed the format... so we can see the changes only externally, but in the formula bar the same 01.05.2016 stays.. i need to get 05/16 to be shown in formula bar. - cinemarter

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.