Hey all,
I have a line of formula, and I am trying to replace a small part of it with another piece of code that will arrive at the same answer in a different way. The original line of code works fine. The snippet of additional code works fine. However, when I insert the snippet, Excel tells me that I have made an error in the formula and will not calculate it.
I can't really explain what the code does as I don't fully understand it. It is a part of a three column array to create a list of unique headings for a pull down menu. The part I want to replace has been marked with {French brackets}.
=(IF(LEN((OFFSET(Data!$G$1,1,0))),SUMPRODUCT(((OFFSET(Data!$G$1,1,0))>OFFSET({Data!$G$2},0,0,$AA$1,1))+0)+1,""))
What I would like to replace it with:
(CONCATENATE("Data!$G$",AD3))
AD is a column of numbers from 1 to 1000 - The logic is that the formula acts on one line lower in each line of the formula. Because of how data is added and removed from the spreadsheet by the user, the automatic system for doing this keeps failing, so I am trying to circumnavigate this via code...
Anyway, I realise that this is quite vague... Does anyone have any suggestions as to why I can't replace the first portion of code with the second? Even better, does anyone have any suggestions on how to fix it?
Cheers,
Max
I have a line of formula, and I am trying to replace a small part of it with another piece of code that will arrive at the same answer in a different way. The original line of code works fine. The snippet of additional code works fine. However, when I insert the snippet, Excel tells me that I have made an error in the formula and will not calculate it.
I can't really explain what the code does as I don't fully understand it. It is a part of a three column array to create a list of unique headings for a pull down menu. The part I want to replace has been marked with {French brackets}.
=(IF(LEN((OFFSET(Data!$G$1,1,0))),SUMPRODUCT(((OFFSET(Data!$G$1,1,0))>OFFSET({Data!$G$2},0,0,$AA$1,1))+0)+1,""))
What I would like to replace it with:
(CONCATENATE("Data!$G$",AD3))
AD is a column of numbers from 1 to 1000 - The logic is that the formula acts on one line lower in each line of the formula. Because of how data is added and removed from the spreadsheet by the user, the automatic system for doing this keeps failing, so I am trying to circumnavigate this via code...
Anyway, I realise that this is quite vague... Does anyone have any suggestions as to why I can't replace the first portion of code with the second? Even better, does anyone have any suggestions on how to fix it?
Cheers,
Max