Here is the infomation I have, which is not a conclusive answer to your question. What more can you tell me about your ancestor? Any pictures, copies of letters in existence?
Richards, Hamilton W., B/42Va
Pvt. H. Richards KIA Cedar Run 862/08/09 [44, 862/08/26] [42Va: 17B5] [42Va: 35c].
Died of wound received 862/08/09, Cedar Run, and buried there [42Va: 2c4]. This source is a postwar Muster Roll, B/42Va, dated 18 July 1884, Floyd C.H., Va., prepared by J.L. Tompkins, late Capt., B/42Va
Franklin Co. death register indicated he died 862/08/13 at Fredericksburg, age 28, "killed in battle" [42Va: 26a]