excel中,如何把相同姓名下的多条内容合并至同一个单元格内?
我用的 WPS~~ 展开
在O,P处写2个辅助列,用来生成公式
P1="",O2=2,
O3=O2+1,
P3=P2&"&"&"IF(AND($A$"&O3&"=G3,$B$"&O3&"=H3,$C$"&O3&"=I3),$D$"&O3&","&$P$1&")"
复制O3,P3,要处理几行就粘贴几行
这里假设要处理11行,从P11复制生成的公式,到记事本里粘贴一下
记得把前面的&换成=,就可以复制到J3使用了
按楼主的截图,就直接复制P15生成的公式
J3=IF(AND($A$3=G3,$B$3=H3,$C$3=I3),$D$3,"")&IF(AND($A$4=G3,$B$4=H3,$C$4=I3),$D$4,"")&IF(AND($A$5=G3,$B$5=H3,$C$5=I3),$D$5,"")&IF(AND($A$6=G3,$B$6=H3,$C$6=I3),$D$6,"")&IF(AND($A$7=G3,$B$7=H3,$C$7=I3),$D$7,"")&IF(AND($A$8=G3,$B$8=H3,$C$8=I3),$D$8,"")&IF(AND($A$9=G3,$B$9=H3,$C$9=I3),$D$9,"")&IF(AND($A$10=G3,$B$10=H3,$C$10=I3),$D$10,"")&IF(AND($A$11=G3,$B$11=H3,$C$11=I3),$D$11,"")&IF(AND($A$12=G3,$B$12=H3,$C$12=I3),$D$12,"")&IF(AND($A$13=G3,$B$13=H3,$C$13=I3),$D$13,"")&IF(AND($A$14=G3,$B$14=H3,$C$14=I3),$D$14,"")&IF(AND($A$15=G3,$B$15=H3,$C$15=I3),$D$15,"")