當前位置:成語大全網 - 新華字典 - 如何用vba字典實現多列合並數據合並

如何用vba字典實現多列合並數據合並

"看看是不是妳需要的

Sub?SumSelect()

Range("A1:A"?&?Application.CountA(Range("a:a"))).Copy?Range("I1")

Range("E2:E"?&?Application.CountA(Range("e:e"))).Copy?Range("I"?&?Application.CountA(Range("i:i"))?+?1)

ActiveSheet.Range("I:I").RemoveDuplicates?Columns:=1,?Header:=xlNo

Number?=?Application.CountA(Range("i:i"))

Range("J2:J"?&?Number)?=?"=IFERROR(VLOOKUP(I:I,A:B,2,0),"""")"

Range("K2:K"?&?Number)?=?"=IFERROR(VLOOKUP(I:I,E:F,2,0),"""")"

End?Sub