T
Titus
Hello all;
I am trying to create a table using data from the worksheet for the
months and year covering the data range. i need the variable "Y" to
accept a year value from within the worksheet to be used later on for
further calculations, as follows:
Dim n As Variant, y As Date
Cells(2, "k") = "=month(small(mp,1))" 'Jan
Cells(2, "l") = "=rc[-1]+30+month(1)" 'Feb
Cells(2, "m") = "=rc[-1]+30+month(1)" 'mar
Cells(2, "n") = "=rc[-1]+30+month(1)" 'apr
Cells(2, "o") = "=rc[-1]+30+month(1)" 'May
Cells(2, "p") = "=rc[-1]+30+month(1)" 'Jun
Cells(2, "q") = "=rc[-1]+30+month(1)" 'Jul
Cells(2, "r") = "=rc[-1]+30+month(1)" 'Aug
Cells(2, "s") = "=rc[-1]+30+month(1)" 'Sep"
Cells(2, "t") = "=rc[-1]+30+month(1)" 'Oct"
Cells(2, "U") = "=rc[-1]+30+month(1)" 'Nov"
Cells(2, "v") = "=rc[-1]+30+month(1)" 'Dec"
Cells(1, "k") = "=year(small(mp,1))" 'year
y = "=r1c11"
end
the problem I am facing is that "y" does not compute the year or date
and it remains as "r1c11", your assistance is greatly appreciated.
I am trying to create a table using data from the worksheet for the
months and year covering the data range. i need the variable "Y" to
accept a year value from within the worksheet to be used later on for
further calculations, as follows:
Dim n As Variant, y As Date
Cells(2, "k") = "=month(small(mp,1))" 'Jan
Cells(2, "l") = "=rc[-1]+30+month(1)" 'Feb
Cells(2, "m") = "=rc[-1]+30+month(1)" 'mar
Cells(2, "n") = "=rc[-1]+30+month(1)" 'apr
Cells(2, "o") = "=rc[-1]+30+month(1)" 'May
Cells(2, "p") = "=rc[-1]+30+month(1)" 'Jun
Cells(2, "q") = "=rc[-1]+30+month(1)" 'Jul
Cells(2, "r") = "=rc[-1]+30+month(1)" 'Aug
Cells(2, "s") = "=rc[-1]+30+month(1)" 'Sep"
Cells(2, "t") = "=rc[-1]+30+month(1)" 'Oct"
Cells(2, "U") = "=rc[-1]+30+month(1)" 'Nov"
Cells(2, "v") = "=rc[-1]+30+month(1)" 'Dec"
Cells(1, "k") = "=year(small(mp,1))" 'year
y = "=r1c11"
end
the problem I am facing is that "y" does not compute the year or date
and it remains as "r1c11", your assistance is greatly appreciated.