Hi Team,
I am trying to convert a text Range into Date using CDate. but it converts single cell only.
Range("d1:d17").Value = CDate(Range("d1:d17").Value) ... type mismatch any alternate.
Option Explicit
Sub ConvertTextNumber_ToDate()
Range("d1").Value = CDate(Range("D1").Value)
Range("d1:d17").Value = CDate(Range("d1:d17").Value) ... type mismatch
End Sub
Below is a Table.
Thanks
mg
I am trying to convert a text Range into Date using CDate. but it converts single cell only.
Range("d1:d17").Value = CDate(Range("d1:d17").Value) ... type mismatch any alternate.
Option Explicit
Sub ConvertTextNumber_ToDate()
Range("d1").Value = CDate(Range("D1").Value)
Range("d1:d17").Value = CDate(Range("d1:d17").Value) ... type mismatch
End Sub
Below is a Table.
Book2 | ||||
---|---|---|---|---|
D | E | |||
1 | 04/08/2012 | TRUE | ||
2 | 08/04/2012 | FALSE | ||
3 | 08/04/2012 | FALSE | ||
4 | 08/04/2012 | FALSE | ||
5 | 08/04/2012 | FALSE | ||
6 | 08/04/2012 | FALSE | ||
7 | 08/04/2012 | FALSE | ||
8 | 08/04/2012 | FALSE | ||
9 | 08/04/2012 | FALSE | ||
10 | 08/04/2012 | FALSE | ||
11 | 08/04/2012 | FALSE | ||
12 | 08/04/2012 | FALSE | ||
13 | 08/04/2012 | FALSE | ||
14 | 08/04/2012 | FALSE | ||
15 | 08/04/2012 | FALSE | ||
16 | 08/04/2012 | FALSE | ||
17 | 08/04/2012 | FALSE | ||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E1:E17 | E1 | =ISNUMBER(D1) |
Thanks
mg