View Single Post
  #1   Report Post  
Deborah K
 
Posts: n/a
Default Replace Static with Variable but leave alone text between them

I have a lengthy list of similar entries, with multiple lines in each entry,
in a .txt file with spaces separating columns of data. (Sample below) I want
the first "Empl Total" to change to "Name1 Total," the second "Empl Total" to
change to "Name2 Total," etc. How?

The names are not all unique. I do not mind too much finding all Name1 &
replacing "Empl" with "Name1," then find all Name2, etc. separately.

Bonus: and I'd love the Name Total cost column to still line up so it'll
work when I import it all to Excel.

Name System Unit Usage Cost
Name1 VM CPU Hr .04 .06
VM DASD Gig .09 .13
Empl Total .19

Name2 VM CPU Hr .06 .09
VM DASD Gig .05 .07
Empl Total .16