When promoted to General, Lee was the third highest ranking general in Confederate service. After Johnston died Lee was the second highest living General. Near the end of the War, Cooper still had an earlier date of rank.
Technically, Samuel Cooper was still the highest raking general in the Confederate army despite having never served in a field command. Cooper, who was a native of New York, served in the Confederate war department throughout the war as Adjutant General and Inspector General of the Confederacy. A. S. Johnston was the second ranking general behind Cooper until his death which was a source of contention between Johnston and Jefferson Davis. Johnston felt that a general who commanded armies in the field should have a higher rank than one who served in an administrative function.