EXHIBIT 23.1
Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference in Registration Statements No. 333-160715 on Form S-3 and No. 333-244322 and No. 333-159074 on Form S-8 of F&M Bank Corp. and Subsidiaries of our report dated March 27, 2024, relating to the consolidated financial statements, appearing in the Annual Report on Form 10-K of F&M Bank Corp. and Subsidiaries for the year ended December 31, 2023.
/s/ Yount, Hyde & Barbour, P.C.
Roanoke, Virginia
March 27, 2024