1、如何找到合計(jì)所在的單元格? Rng =sheet1. Cloumns(2). Find(what: ="合計(jì)") K=rng. Rows. Count (????) K=rng. Row(???)
2、如何批量插入行? i=application.Worksheetfunction.Countif_ (sheet1. Range ("a1: a1000"), "a") sheet1. Range ("a100: a"&100 i-1). Entirerow. Insert
3、通過篩選法插入不重復(fù)值 Sub text - 確定需插入不重復(fù)值個(gè)數(shù) i=application.Worksheetfunction.Countif_ (sheet1. Range ("a1: a1000"), "a")
- 插入行
sheet2.Range ("a100: a"&100 i-1). Entirerow. Insert
Sheet1.Range("a1").CurrentRegion. AutoFilter field:=13, Criteria1:="a" Sheet1.Range("a2:l" & Sheet1.Range("a1").End(xlDown).Row).
Copy Sheet2.Range("a100") End sub
|