sub replaceCode() dim sht as worksheet, rng as range set sht = worksheets("XX") set rng = sht.range("L2") rng.value = ringht$(rng.value,3) end sub