Sub stor()
'stor 为十进制转n进制 ’n<10Dim stor, shi As Long
stor = "" ‘余数变量初始化为空
n = Range("b3")shi = Range("a3")
’从表格内取值
Do While shi > 0
stor = shi Mod n & stor ’求除数
shi = Int(shi / n) ’计算剩下的值
Loop
Range("c3") = stor ‘显示结果
End Sub