I am trying to set a combination of INDEX and MATCH formula results to a variable instead of set the results to a cell.
The code that I have so far is as below:
Dim todayDate as Date
Dim startDate as Date
todayDate = Format(Date, "MM/dd/yyyy")
startDate = "=INDEX([Financial_Calendar.xlsx]Calendar!C2,MATCH(CLng(todayDate.Value),[Financial_Calendar.xlsx]Calendar!C9,0))"
The startDate formula will find the todayDate inside the excel file and return the value of the startDate for todayDate row. The startDate value is in Date form.
But now I still did not able to get the value returned.
Can anyone help me on this ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…