import data

E

Elsie

hi, need to do a report that has been done manually using macro or vba.
being done manually, the user can select which borders to have a certain
thickness, which rows to hide and to sum up data for 6 months etc..

so I am considering of doing a 'template' with all the borders and all
formulas done beautifully then just import the data in. I have tested this
method, the data should be imported using delimited (as per the wizard) and
just click 'next' all the way...BUT, the imported data will overwrite my
beautiful borders and formulas.

or the other way is to identify which lines and which cells need the special
border or formula and somehow program them into macros...

which is a better method?

Elsie
 
E

Earl Kiosterud

Elsie,

You could create a sort of template sheet containing the borders and other
formatting, then after the import, paste the borders to the imported (data)
sheet with something like:

Sheets("BorderTemplate").Range("A1:F13").Copy ' get formatting (borders)
Sheets("Data").Select ' imported sheet
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteFormats


Your formatting template sheet must contain any date or other formatting, as
this will be overwritten on the data sheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top