vba 在excel一个单元格里面有如以下的输入格式:如果cells(1,1)里面的值为:1234,abc,ded,www如何通过vba在让另一个单元格cells(1,2)的内容等于第2个逗号和第3个逗号之间的内容,即ded
cells(2,1)=mid(cells(1,1),instr(instr(1,cells(1,1),",")+1,cells(1,1),",")+1,instr(instr(instr(1,cells(1,1),",")+1,cells(1,1),",")+1,cells(1,1),",")-instr(instr(1,cells(1,1),",")+1,cells(1,1),",")-1)也可以参照楼上的X=split(cells(1,1),",") cells(2,1)=X(2)