Fault diagnosis plays a major role in IC yield enhancement. Due to circuit structure and ATPG limitation, there exist many undistinguished fault pairs after applying test patterns and diagnosis patterns, including equivalent fault pairs and aborted fault pairs. This paper proposes a scan-based repair-for-diagnosis architecture that can distinguish undistinguished fault pairs by repairing cell defects. A repairable standard cell design technique is presented that makes the repair of defective cells easy to control. To efficiently distinguish all targeted undistinguished fault pairs, a novel fault-grouping method is developed and applied to the proposed scan-based repair-for-diagnosis architecture. With this architecture, one can distinguish multiple fault pairs and repair those defective cells hence improving yield at the same time. Experimental results show that our proposed architecture can distinguish all targeted undistinguished fault pairs and repair the defective cells with low area overhead.