Hi,
You can use the column range to access the data in columns. For example,
range rO2 = O2!;
range rN2 = N2!;
rO2.AddCol(currentcor);
range rO2Currentcor = O2!col(currentcor); // the newly added column range
range rO2Col = %(rO2)col(WE(2).Current (A)); // column range in O2 worksheet, use sheet range variable with %() substitution
// range rO2Col = O2!col(WE(2).Current (A)); // use sheet name to declare column range directly
range rN2Col = %(rN2)col(WE(2).Current (A)); // column range in N2 worksheet
rO2Currentcor = rO2Col - rN2Col;
Please note that you can use both worksheet name and worksheet range variable to declare column range. However, when using worksheet range variable, the %() substitution is needed. You can see the difference in the script above.
For more information about range, please refer to this page.
Penn