silicon_beaver
New Member
- Joined
- Aug 14, 2013
- Messages
- 43
I did search previous posts but fail to find an answer.
Feb 01 2014, I was trying to obtain yahoo data, search in col(1) 360 days ago.
x = DateValue(Date - 360) ' note, date =2/1/2014, x=2/6/2013
Set Cell_find = Columns(1).Find(DateValue(x))
I need the day 2/6/2013. In stead, vba returns 12/6/2013 always. looks "12/6/2013" containing string "2/6/2013". But it's not correct result I expected.
I also tried.
x = Format(Date - 360, "mm/dd/yyyy") ' 12-mon ago
Columns(1).NumberFormat = "mm/dd/yyyy"
Set tt = Columns(1).Find(x) ' tried, but return "Nothing"
Set tt = Columns(1).Find(CDate(x)) ' tried, but still return "12/6/2013"
Set tt = Columns(1).Find(DateValue(x)) ' tried, return "12/6/2013" either
none correct.
Anyone knows how to fix it? Thanks in advance.
Feb 01 2014, I was trying to obtain yahoo data, search in col(1) 360 days ago.
x = DateValue(Date - 360) ' note, date =2/1/2014, x=2/6/2013
Set Cell_find = Columns(1).Find(DateValue(x))
I need the day 2/6/2013. In stead, vba returns 12/6/2013 always. looks "12/6/2013" containing string "2/6/2013". But it's not correct result I expected.
I also tried.
x = Format(Date - 360, "mm/dd/yyyy") ' 12-mon ago
Columns(1).NumberFormat = "mm/dd/yyyy"
Set tt = Columns(1).Find(x) ' tried, but return "Nothing"
Set tt = Columns(1).Find(CDate(x)) ' tried, but still return "12/6/2013"
Set tt = Columns(1).Find(DateValue(x)) ' tried, return "12/6/2013" either
none correct.
Anyone knows how to fix it? Thanks in advance.