import data

  • Thread starter Thread starter Elsie
  • Start date Start date
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
 
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.
 
Back
Top