hi all,
i would like to check a range of cell whether is date format or not, and if yes, change it to format(cell.Value, "yyyy/mm/dd")
please help.
thank you.
i would like to check a range of cell whether is date format or not, and if yes, change it to format(cell.Value, "yyyy/mm/dd")
Code:
Sheets(1).Select
last_row = ActiveSheet.UsedRange.Rows.Count
For Each cell In Range("G1:H" & LastRow)
'how to write this part
if the cell format is date then
cell = Format(cell.Value, "yyyy/mm/dd")
end if
Next
please help.
thank you.