I am going to be receiving an excel file on a weekly basis
This excel file is going to include about 10,000 rows. I need to do the following every week.
1. Add a column titled Condition between B and C
2. Any item in column A that ends in -LP needs to have -LP changed to -CMP
3. Any item in column A that ends in -OR or -RX needs to have colum C say REF
4. Any item in column A that ends in -LP, -3, -K3, or -CMP needs to have column C say OEMREF
5. Any item in column A that ends in -X, or has no - ending, column C should say OEM
6. a list of all items from column A that did not match the rules above should be placed in a new sheet (IE create a sheet)
What is the best way to automate this each week. (IE I can click “go” or whatever and it just does it all then gives me the resulting data)
I am open to programs, scripts, or whatever really to do this, Just looking for some ideas on what direction to go.
I only have Office XP, but I imagine you can still do something comparable:
Open the Control Toolbox toolbar. Using this, you should be able to create the button that is going to do the processing. Next, make sure you are in Design mode (it is a toggle on the control toolbox toolbar). Right click the button, and choose “View Code” from the context menu. This will bring up the Visual Basic editor for Excel. From here you should be able to access all the data in the sheet, and manipulate them any way you wish. Here is a tutorial that will lead you further: Anthony’s VBA Page. Definitely follow his advice on recording a macro, because looking at the code that a macro produces often eliminates reading the documentation.
For simple tasks like you outlined above, using the tools that came with Office are probably the way to go.