Quote:
Originally Posted by NoSparks
I must confess, I have no idea how or why that works.
I don't know where the active cell is when you start and I guess your sheet lay out is not as I envision it,
but hey, if you're happy, I'm happy.
Good Luck with your project.
NoSparks
|
That was my fault. I presented my problem in wrong way. My question must be edites as follows : In the first cell of each row (column A), there is a name (header) and in the other cells there are some numbers relating to first column (for example, A1 is inflation and A1:f1 are .01,.02 …which are inflation amount of different years).
Also there was a minor problem with my codes that I solved it. (The line ActiveWorkbook.Names.Add Name:=ActiveCell.Value, RefersTo:="=" & "INDEX(" & cellAddress02 & ":" & cellAddress & "," & myrow & ") must be replaced with ActiveWorkbook.Names.Add Name:=ActiveCell.Value, RefersTo:="=" & "INDEX(" & cellAddress02 & ":" & cellAddress & "," & "row(" & cellAddress & ")" & ")". (sorry, the Edit Bottom is not available for me to edit them)
But anyway, my main problem was how to make VBA codes distinguish between text and parameter which I learned form your response.