Combine active cell and max value loops