Remove repeated headers in Imported Text file

rosh_nana

New Member
Joined
Feb 10, 2011
Messages
1
Hi Guys

I have a problem at work where I need to remove the repeated headers that appear on excel because of the text file I import data from.

If I am to state the required task it is such-

I need to write a macro to choose the latest text file from a particular folder and then put it in the required columns with only one main set of headers.

Presently when importing manually there are repeated headers for every page in the text file. That is an issue when adding filters. I need to remove the extra headers and also the blank lines in between the imported pages.

I'm a total newbie in the macro scene so would someone please explain to me how I can achieve what I stated above.

Many Thanks

Rosh:)
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Do the headers have a consistent format ?
If yes, it may be possible to use Data, Filter to filter out all headers except the first one, and also filter out blank lines.
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,679
Members
449,463
Latest member
Jojomen56

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