View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Martin Fishlock Martin Fishlock is offline
external usenet poster
 
Posts: 694
Default Changing data in .csv file

Hi Chip:

The solution works nicely if the cells are in the same position each month
and opening and closing the csv file does not casue any problems.

Another way is to use a macro and do a replace and replace all the accounts
with the new accounts but you have to be careful that you don't replace
amounts or employee numbers etc.

As you didn't give an example of the data it is a little difficult to comment.

I would actually prefer a macro that reads the file processes it and then
saves it again with a parameter sheet specifing the requirements.

If the file is a fixed format file then you could also use a shadow file ie

in the shadow file you link each cell to the original file and then adjust
the accounts that need to be adjusted and then you just relink the file each
month and save as csv.

Hope it's given you some ideas.
--

Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Teethless mama" wrote:

format cell as: 85000000


"Chip" wrote:

Howdy from Oklahoma!!

I am not an excel person so i am having trouble with this situation.

We have a program that builds a .csv file with our payroll data that is sent
to our home office for importing into the corporate payroll system.

Now for the situation, our home office has made some changes to the
accounting system and the charge# (i.e. 77074) that we used to identify what
account the payroll time needed charged to. this charge# now is a 8-digit
number with a '850' added to the original charge# so it now it should look
like this "85077074" with the 850 in front of the original 77074.
Is there any way I can build a macro or some other wizard that i can create
for our payroll people here that can take the column that has the charge# and
do something like adding 85000000 to each charge# in the column? or if it
can just add the 850 to the beginning of each charge#???

Again, I am not an excel person so this may be a Simple Fix but i just do
not know enough about excel to set up something like this...

As Always, THANKS IN ADVANCE!!!!
Chip