First, i think you requirements are not well defined:
Suppose you enter "GLOBAL" as your search string and "x" as replacement. Now suppose you have the following file contents (exact formatting not preserved):
"GLOBAL" "something"
"BARCLAY GLOBAL" "something else"
"SOMETHING" "GLOBAL whatever"
Should only the first line be changed? The first and the second? All three? Depending on your answer the necessary sed-script will look differently.
Second, here is how to preserve the formatting of tabular data with spaces with sed:
First identify the lines that have to be changed. See above, it is not clear yet how this should be done. All the other lines can pass unchanged.
Then, identify the lines where the "second field" has to be changed. (If this is part of the requirement, i.e. if the third line in the above example has to be changed.) These lines are the easiest, because there is no following field where the formatting has to be preserved. These lines are simply changed by a substitution-directive the way you did it already. s/pattern/replacement/
With these lines you are done now.
Then you tackle the lines which need replacement in the first field. Apply the following procedure to these:
Do your pattern replacement as usual.
Replace the spaces between the fields with exactly 45 spaces (the width of your first column, as i recall).
Do a substitution on the line with the following pattern: The first 45 characters plus all following characters beginning at the first non-whitespace. This effectively cuts out the excessive spaces and reformats the line.
You might ask why you have to first delete all the spaces, then enter some and lastly cut some of them out again. This is necessary because the replacement string could be shorter than the original. This way you make sure you have excessive spaces in the line so that the last step always "trims down" the line.
In fact, if you follow the above procedure, you will see that every paragraph i wrote matches exactly one sed-statement. So, get you sed man-page and start trying. If you have trouble writing the sed-script show what you did and we will help you gladly.
I hope this helps.
bakunin