Home > Software engineering >  Emergency!!!!!! VBA batch import and batch export standard form
Emergency!!!!!! VBA batch import and batch export standard form

Time:09-23

Masters:
Recently have thousands of rows of data (see the claim detail), each row represents claims for a supplier of information (including name of the supplier, the original amount, supplier name, claims number, claim products, quantity, occurred in, etc.),

Each line need to be in the details of the claim information corresponding to copy paste to standard form corresponding shaded area, because the data volume is too big, and is a repeated action, don't know can use VBA to realize? Urgent need, thank you very much
The standard shaded area source of data in a table as follows:
GX2016090476 from claims in the details of the claim number
The 2016-9-2 comes from in the details of the claim documents making date
Dawn in the details of hydraulic co., LTD., is derived from the claim supplier name
Jiang Jingli derived from the standard address book dawn hydraulic co., LTD., the corresponding contact, if the supplier name was not found in the standard directory, then contact, phone, fax all blank, the other work to continue
In 3775893399 from the standard directory Jiang Jingli corresponding phone
Jiang Jingli corresponding to fax in 7732760 from the standard directory, such as not just an empty
Filter is derived from the claim list claim product
Number 13 from the claim list
In August 2016, comes from in the details of the claim happened in
230 is derived from the original amount in the details of the claim
269.1 from the claims in the details of the claim amount

Hope after each line into claims, save as excel table, stored in the "claims" folder on the desktop, and form the way named as: claims after the number six figures + name of the supplier, this example finally generated

Excel name should be "090476 dawn hydraulic co., LTD.",

CodePudding user response:

This should be very simple,

Please refer to:

 Option Explicit 

Sub OutputAll ()
Dim As Long, I Sht As Worksheet
The Set Sht=ThisWorkbook. Sheets (1)
For I=2 'assumptions To 2000 To 2000 lines
Call MyOutPut (I, Sht)
Next
End Sub

Sub MyOutPut (ByVal bLine As Long, fSht As Worksheet)
"' will lead to a specific form of a line data and save the
With Workbooks (" form ") "'
this workbook is a specific formWith the Worksheets (1)
Range (" c4 ")=fSht. Cells (bLine, "f")
"'...

End With
The SaveAs "d: " & amp; FSht. Cells (bLine, "c") & amp; ". XLS "
End With
End Sub

'




.

CodePudding user response:

Hello, I'm learning VBA, see don't understand, you can add your qq

CodePudding user response:

For the "standardized, a large number of repeat operation", it is very easy to use VBA to solve, very suitable for solution,

CodePudding user response:

1st floor to the program, look not to understand, is there a direct number, I want to learn, just contact this, feel very difficult, can't read at all

CodePudding user response:

Use vba completely realize the demand of you need to spend a little time,

The best solution is someone give you a framework, after studying yourself, if you have questions to ask,

CodePudding user response:

The building Lord problem solving not - _ -, if urgent, I can also give a try, my mailbox 645924656 @qq.com
  •  Tags:  
  • VBA
  • Related