i am looking for a piece of vb code which replaces all references in a cell formula. the references may be to other cells, other worksheets or other workbooks, so that the new formula will just have variables. any help will be appreciated.