vba - Excel Macro - to import data from multiple Excel files from certain cells -


Please help me with any of the following questions? Daily I get 3 different files through e-mail and I need these XLS file data on the exchange. The layout of each file varies, however the files received daily will be in the same format, only the date of the current days will be different, will be added to the Axle file. File 1 is named: BlankApp_yyyymmdd.xls / file2 is named: DisRep_yyyymmdd.xls / file is named 3: PerApp_yyyymmdd.xls

From file 1, I need data from B2, A7, D11 , G11 (single line) file from 2, me A7, C8, E9, H9 (single line), A11, C12, E13, H13 (single line), A15, C16, E Data is required from 17, H17 (one line); Data from A1, C20, E21, H21 (single line) file 3, I need data from B2, A7, D11, G11 (single line). In summary I need data of approximately 6 lines in my workbook daily, which should be deposited on a daily basis. help please.


Hi guys, I got a code that gives me the expected result (below the FIR), but it will only solve the part of my question. I file 1 & amp; File 3, still to find an answer for File2

Sub Blank Personalized ()

  String = "B2, A7, D11, G11" Const CellList Constring as strfldrPath String = C: \ New Folder \ "Documents' folder where files dim the wsDest live worksheet dim RngDest as range Range dim as RngCell dim dim arrata (as) version slowed Current string as the string dim In the form of rIndex Long, cIndex as the long set wsDest = ActiveWorkbook .ActiveSheet CurrentFile = Dir (strFldrPath & amp; "* .xls *"). Set rngDest = wsDest.Cells (rows.Count, 'A') and (xlUp) .Offset (1) ReDim arrData (1 Rows.Count, 1 Range (Celllist). Number) application.Running = 0 rIndex + 1 cIndex = 0 in every rngCell with screen updating = LAN (currentfile)> Workbooks.Open (strFldrPath & CurrentFile). (1) for the Sheets (1) .Range (CellList) .Cells cIndex = cIndex + 1 arrData (rIndex, cIndex) = rngCell.Value Next RNGLL. CurrentFile = Incorrect and close with the Dir loop application. ScreenUpdating = True if rIndex & gt; 0 then rngDest.Resize (rIndex, UBound (arrData, 2)) Value = arrData set wsDest = nothing set rngDest = nothing set rngCell = nothing delete ErData   

End Sub


Two files From, I need to get 3 different rows -> Date 2 - I need A7, C8, E9, H9 (single line), A11, C12, E13, H13 (single Data is required from the row), A15, C16, E17, H17 (single line) & amp; A19, C20, E21, H21 (single line)

  option clear sub-testing () dim Work as a WB3 Workbook, as the WB2 Workbook, WB3 Workbook, as the WB3 worksheet dim vFile as the version set 'set source workbook set' West Bengal = ActiveWorkbook 'Open the target workbook vFile = Application.GetOpenFilename ("excel-files , * .xls ", as _ 1," select a file to open ", incorrect) 'If the user does not choose any file If so, exit type nickname (vFile) = "boolean" then exit sub workbooks. Open 'set vFile' Set the target workbook For example, copy the data from a range in another workbook wb2.Worksheets ("Sheet2") in another workbook in the first workbook for wb2 = ActiveWorkbook. Range ("C3: D4"). Value = wb.Worksheets ("Sheet1"). Range ("A1: B2"). Price ending sub  

Using the above should be a good start.

Referred from here

Not sure where you want the data or what macro you want.

Comments