Text Files

K

KarenW

I am importing a comma-delimited text file. I need to format one column in
the file to show as currency. What is the best way to do this so when the
file is imported weekly it automatically convert that column?

Examples:
10633 needs to show as 106.33
850 needs to show as 8.50
4914 needs to show aw 49.14
 
D

Dave Peterson

Create a macro that does all the work (importing, formatting, ...) that you
want.

Start a new workbook
Start recording a macro in this new workbook
Import your data
format your data
(fix the page setup, column widths, freeze panes, autofilters...)
Stop recording your macro

Close the data workbook.

Back to the workbook with the newly recorded macro.
Save this with a nice name:
ImportAndFormatWeeklyData.xls

Add a button from the forms toolbar to a worksheet.
Assign the recorded macro to this button

Add some instructions to this worksheet

Save the workbook (again).

Try clicking on the button to see if it works.
 
K

KarenW

It worked! Thank you very much!

Dave Peterson said:
Create a macro that does all the work (importing, formatting, ...) that you
want.

Start a new workbook
Start recording a macro in this new workbook
Import your data
format your data
(fix the page setup, column widths, freeze panes, autofilters...)
Stop recording your macro

Close the data workbook.

Back to the workbook with the newly recorded macro.
Save this with a nice name:
ImportAndFormatWeeklyData.xls

Add a button from the forms toolbar to a worksheet.
Assign the recorded macro to this button

Add some instructions to this worksheet

Save the workbook (again).

Try clicking on the button to see if it works.
 

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