You can't do that with a formula, but you can do it with Excel's Replace
functionality. Click Edit/Replace on the menu bar or, alternately, press
Ctrl+H to bring up the Replace dialog box. Click the "Options>>" button to
display all the available option if they are not already displayed. Leave
the "Find what" and "Replace with" fields empty. Click the Format button to
the right of the "Find what" field, click the Patterns tab and select the
color you want to replace. Next, click the Format button to the right of the
"Replace with" field, click the Patterns tab and select the color you want
to replace it with. Finish off by clicking "Replace All" button. The above
procedure will perform the replacement throughout the active worksheet... if
you want to restrict the color replacements to a certain area of the active
worksheet, select a range that encompasses those cells first, then follow
the above procedure.