Find pivot column through trial and error