Importing Data to Excel Workbook

caruk392

New Member
Joined
Aug 18, 2018
Messages
1
Hi,

I am working on a project and I am trying to import data fromone excel workbook (possibly converted to a .txt file) to another and wouldlike to use vba to do it. The data imported to the second excel workbook wouldneed to be inputted on various worksheets and various cells, which are not nextto each other.


The data in the first excel sheet has been grouped frommultiple sheets and arranged to include the following on 3 columns:

[TABLE="width: 119"]
<tbody>[TR]
[TD="width: 69, bgcolor: transparent"]
Sheet
[/TD]
[TD="width: 37, bgcolor: transparent"]
Cell
[/TD]
[TD="width: 61, bgcolor: transparent"]
Amount
[/TD]
[/TR]
[TR]
[TD="width: 69, bgcolor: transparent"]
P1
[/TD]
[TD="width: 37, bgcolor: transparent"]
A1
[/TD]
[TD="width: 61, bgcolor: transparent"]
10
[/TD]
[/TR]
[TR]
[TD="width: 69, bgcolor: transparent"]
P5
[/TD]
[TD="width: 37, bgcolor: transparent"]
E5
[/TD]
[TD="width: 61, bgcolor: transparent"]
2
[/TD]
[/TR]
[TR]
[TD="width: 69, bgcolor: transparent"]
P8
[/TD]
[TD="width: 37, bgcolor: transparent"]
D4
[/TD]
[TD="width: 61, bgcolor: transparent"]
1
[/TD]
[/TR]
[TR]
[TD="width: 69, bgcolor: transparent"]
P8
[/TD]
[TD="width: 37, bgcolor: transparent"]
D6
[/TD]
[TD="width: 61, bgcolor: transparent"]
4
[/TD]
[/TR]
[TR]
[TD="width: 69, bgcolor: transparent"]
P8
[/TD]
[TD="width: 37, bgcolor: transparent"]
E7
[/TD]
[TD="width: 61, bgcolor: transparent"]
8
[/TD]
[/TR]
</tbody>[/TABLE]

The first column includes the name of the excel sheet wherethe data needs to be inputted. The second column includes the specific cell onthe worksheet needs to be inputted and the third column is the amount whichneeds to be included on the specified cell on the specified worksheet.

Ideally I would like the data to be extracted from a txtfile created from the first excel workbook which will have a standard name andsaved in the same folder path as the second workbook as this would (at least I thinkso) enable the system to be utilised on multiple workbooks.

Do you have any idea how the above may be achieved? So far Ihave only been able to import data to the second excel sheet rows and columns androws which are next to each other.

Apologies if anything is unclear.

Thanks in advance,
Keith

 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Keith,
your question is quite clear, could you add the code you already made? (Maybe with comments in the code where things should change.) Please put the code in [ CODE ] [ / CODE ] brackets for readability.
Thanks,
Koen
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top