Dear, I need to make a macro emulating the EXCEL =TEXT() function in vb.
the idea is that by having cells with hours (7:55) the vb function transforms me to 07:55. Usually for this I use =TEXT(cell,"hh:mm"), this transforms it for me. I need to bring that function to visual basic but it doesn't work for me with the following code:
Sub cambiarFormatohhmm()
Dim celda As Range
For Each celda In Selection
celda.Value = Texto(celda,"hh:mm")
Next
End Sub
Any ideas?
Try changing the line
for
to look like this: