Can I do a manual transmission swap on a 1999 awd Honda cr v?

A buddy of mine blew up the engine in his 1999 hona crv awd and hes gonna sell it for 500, so my question is
If you had a 1999 automatic awd cr v can you swap a standard transmission?
I know you would have to like drill a hole in the dash but would it work?
And how much would it cost for a manual transmission and a new engine to be put on a AWD cr v
Looking to spend about $1500 on parts

Yes, you can. The CRV actually was offered with a manual tranny on the EX models back in 1999. I would recommend replacing the B20Z in that one, sell it, and buy a manual tranny version.

Yes, if you're willing to cut holes for the stick, and willing to drop under or around $4000 it is easily done.