软件:excel
版本:2016
原档:
https://imgur.com/JdfTA4n
想改成
https://imgur.com/6QTVThH
想把原档案转至后贴到另一个新档案,并且按照分公司名称存盘
有尝试爬文来修正,但一直失败...
遇到有合并的存储格无法抓取,也不知道怎么转置
想请教各位大大帮忙
Sub Macro1()
Dim rLastCell As Range
Dim strName As String
Dim lLoop As Long
Dim wbNew As Workbook
Dim cnt As Integer
With ThisWorkbook.Sheets(1)
Set rLastCell = .Cells.Find(What:="*", After:=[A1], _
SearchDirection:=xlPrevious)
For lLoop = 2 To rLastCell.Row
cnt = WorksheetFunction.CountIf(Range("c:c"), Range("c" & lLoop))
Set wbNew = Workbooks.Add
试跑到这边都是正常的,但后续就不知道如何处理了
谢谢