Allow only Text or only Numbers Entered into a Cell in Excel - Data Validation

Go Data Validation, choose custom formula and enter below

=IF(A2="",TRUE,IF(ISERROR(SUMPRODUCT(SEARCH(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),"0123456789abcdefghijklmnopqrstuvwxyz"))),FALSE,TRUE))

Change A2 to the cell and change 0123456789abcdefghijklmnopqrstuvwxyz to something else if need to.