Import .dbf file, and process its contents.

burgonyapure

New Member
Joined
May 31, 2019
Messages
3
Hi guys !

I am new to excel programming, yet I have work to be done, so if you could help me out it would be well appreciated.

I have several .dbf files, and they look like this in excel:
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 54"]
<tbody>[TR]
[TD="class: xl91, width: 54, align: right"]401003[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 56"]
<tbody>[TR]
[TD="class: xl91, width: 56"]EUR[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 48"]
<tbody>[TR]
[TD="class: xl91, width: 48, align: right"]10[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 215"]
<tbody>[TR]
[TD="class: xl91, width: 215"]2019.04.01[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl91, width: 75, align: right"]200[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl91, width: 75, align: right"]62200[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 47"]
<tbody>[TR]
[TD="class: xl91, width: 47, align: right"]311,00[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 54"]
<tbody>[TR]
[TD="class: xl91, width: 54, align: right"]401004[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 56"]
<tbody>[TR]
[TD="class: xl91, width: 56"]RON[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD] [TABLE="width: 48"]
<tbody>[TR]
[TD="class: xl91, width: 48, align: right"]10[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 215"]
<tbody>[TR]
[TD="class: xl91, width: 215"]2019.04.01[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl91, width: 75, align: right"]121[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl91, width: 75, align: right"]7464[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 47"]
<tbody>[TR]
[TD="class: xl91, width: 47, align: right"]61,69[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 54"]
<tbody>[TR]
[TD="class: xl91, width: 54, align: right"]401005[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 56"]
<tbody>[TR]
[TD="class: xl91, width: 56"]GBP[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 48"]
<tbody>[TR]
[TD="class: xl91, width: 48, align: right"]10[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 215"]
<tbody>[TR]
[TD="class: xl91, width: 215"]2019.04.01[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl91, width: 75, align: right"]300[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl91, width: 75, align: right"]108750[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 47"]
<tbody>[TR]
[TD="class: xl91, width: 47, align: right"]362,50[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Obviously a lot longer, but you get the point.

All I need to do, is a button to click, and than loop through all the .dbf files, do a =SUMIF(D1:D3;D1;F1:F3) and paste the result into another sheet wich looks like:
[TABLE="width: 500"]
<tbody>[TR]
[TD]2019.04.01[/TD]
[TD]My result here[/TD]
[/TR]
[TR]
[TD]2019.04.02[/TD]
[TD]My result here[/TD]
[/TR]
[TR]
[TD]2019.04.03[/TD]
[TD]My result here[/TD]
[/TR]
</tbody>[/TABLE]
After this close, the .dbf file, open the next one, and do the same, but the data calculated must be inserted into it's corresponding sheet.

Any ideas?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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