Forum Discussion
Automating Party Transactions in Excel Using VLOOKUP and VBA Macros or anything
Could you upload a sample file without sensitive data.
- Shruti2929Nov 25, 2024Copper Contributor
https://filetransfer.io/data-package/beXdVs3F#link
uploaded master sheet plus 3-4 party details how i make the file
- Rodrigo_Nov 25, 2024Iron Contributor
Try this: (see attached file)
Upon pressing CTRL+R:
Scroll right to see a button to export that sheet into a new workbook, it will be saved on the same path file.
- peiyezhuNov 28, 2024Bronze Contributor
VBA
https://club.excelhome.net/forum.php?mod=viewthread&tid=1702322&fromguid=hot&extra=&
Sub limonet()
Dim Cn As Object, StrSQL$, Arr As Variant, i%, CS$
Set Cn = CreateObject("Adodb.Connection")
CS = "Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=Excel 12.0 xml;Data Source="
Cn.Open CS & ThisWorkbook.FullName
Arr = Cn.Execute("Select Distinct Outward From [DAILY_INWARD_OUTWARD$A1:S].GetRows
For i = 0 To UBound(Arr, 2)
Cn.Close
Cn.Open CS & ThisWorkbook.Path & "\" & Arr(0, i) & ".xlsx"
StrSQL = "Select * Into Sheet1 From [Excel 12.0;DataBase=" & ThisWorkbook.FullName & " ].[DAILY_INWARD_OUTWARD$A1:K] Where Outward='" & Arr(0, i) & "'"
Cn.Execute (StrSQL)
Next i
End SubOr
Online.tool
【split one sheet to multiple workbooks by online sql工作表拆分-哔哩哔哩】 https://b23.tv/lbNN2ct