Exhibit 23 CONSENT OF INDEPENDENT AUDITORS We consent to the incorporation by reference in the Registration Statements pertaining to the Incentive Stock Option Plan (Form S-8, No. 33-22941) and the Savings and Stock Investment Plan (Form S-8, No. 33- 32522) of United Bankshares, Inc., of our report dated February 27, 1998, (except Note O, as to which the date is March 27, 1998, and Note B, as to which the date is July 29, 1998) with respect to the consolidated financial statements of United Bankshares, Inc. and Subsidiaries as of December 31, 1997 and 1996, and for each of the three years in the period ended December 31, 1997, included in this Current Report on Form 8-K. /s/ERNST & YOUNG LLP ____________________ Charleston, West Virginia July 29, 1998 84