Complex sentence: Afterward, Grant created the Army of the Shenandoah and put Sheridan in command; his orders were to repel Early, and to deal with Confederate guerrillas in the Shenandoah Valley; which he quickly did.
Split into simpler sentences: Afterward, Grant created the Army of the Shenandoah and put Sheridan in command. Sheridan's orders were to repel Early, and to deal with Confederate guerrillas in the Shenandoah Valley, which he quickly did.