Hi,
I have a line of code that is supposed to convert range (that is currently in dd-mmm-yyyy format) to dd-mm-yyyy. However, the format does not seem to change. When I click on the format cells (from the number section on the Home tab) to check the format it indicates that it is in dd/mm/yyyy format, though it clearly is not and the sample is in the dd/mmm/yyyy format.
The conversion code is:
Below is a screenshot of displaying the date in the cells and the format selected from the format cells screen.
I need the code to correctly change the date to dd/mm/yyyy.
Are you able to help
Cheers
Glenn
I have a line of code that is supposed to convert range (that is currently in dd-mmm-yyyy format) to dd-mm-yyyy. However, the format does not seem to change. When I click on the format cells (from the number section on the Home tab) to check the format it indicates that it is in dd/mm/yyyy format, though it clearly is not and the sample is in the dd/mmm/yyyy format.
The conversion code is:
VBA Code:
wsRData.Range(wsRData.Cells(2, 6), wsRData.Cells(lastrow, 6)).NumberFormat = "dd/mm/yyyy"
Below is a screenshot of displaying the date in the cells and the format selected from the format cells screen.
I need the code to correctly change the date to dd/mm/yyyy.
Are you able to help
Cheers
Glenn