0

I am working on populating a new application full of resident data. I have to export a list of residents for each property. Unfortunatly the new application has to have the residents imported 1 property at a time. This means im stuck loading 200+ properties by exporting an excel file, slightly modifing the data and then importing into the new application.

For each property that is exported I must remove a '-' from the first column and i have to remove all of the ',' throughout the entire document. I then change the formating on a date column to 'mm/dd/yyyy'. Then the document is saved as a CSV and can be imported.

I would like to write a script that can perform the updates to the excel file and save it to a csv. Please advise if this is worth my time. This is a one time load so it might be better to just power through.

Thank You

2
  • do you know any scripting languages? It might be easier to convert it to csv first (just using save-as in Excel), then use something like Python, Ruby or another language to manipulate the data and change the files. Commented Oct 7, 2012 at 22:33
  • So, to clarify, you're performing the same action on 200 different worksheets? Are you currently using replace all in the find & replace dialog, or do you require more fine-grained control than that? Commented Oct 8, 2012 at 0:13

1 Answer 1

1

Possibly a little prematurely, as I'm not certain this is what you want to achieve, but you could try this (save first):

Sub replaceStuff()

    ActiveSheet.Range("A:A").Replace "-", ""
    ActiveSheet.Cells.Replace ",", ""
    ThisWorkbook.SaveAs "doc", xlCSVWindows

End Sub
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.