My thoughts were to only process records where Val() is more than 999, so that would get past that issue?
My suggestion assumes a one time pass. If this is a regular thing then you modify the formula slightly
str="1,246, Cosworth Place"
replace(str,val(replace(str,",","")),format(val(replace(str,",","")),"#,##0"))
?replace("1,246, Cosworth Place",val(replace("1,246, Cosworth Place",",","")),format(val(replace("1,246, Cosworth Place",",","")),"#,##0"))
1,246, Cosworth Place
and without a comma in the number
?replace("1246, Cosworth Place",val(replace("1246, Cosworth Place",",","")),format(val(replace("1246, Cosworth Place",",","")),"#,##0"))
1,246, Cosworth Place
and for numbers <1000
?replace("123, Cosworth Place",val(replace("123, Cosworth Place",",","")),format(val(replace("123, Cosworth Place",",","")),"#,##0"))
123, Cosworth Place