I'm trying to migrate VBA code from Excel 2000 to 2007.
After all the initial issues and building a new Ribbon for the application, I'm now face with one sub that display a behaviour that I can't explain...
The formula uses the .row of the range (RC) pass to it, to generate a value that is used to link data from two sheets.
Seems that when the formula "generate_Dcode" execute with the col range, the row are offsets in 2007!?!
Instead of executing for row 2,3,4 up to the max row in the range... like in excel 2000, It's executing for row 3,5,7...
Then comes back to do row 2,4,6....
Which in the end generated mismatch between the two sheets.
I have a work around by executing with a FOR ... EACH. But it's way slower. Ex.: 1 sec VS 12 sec average for 2000 rows.
I can't find why it's behaving that way. I've change the .Formula for .FormulaR1C1, but this did not change anything.
Thanks in advance and any help would be appreciated.
Bookmarks