## How to replace part of formula in all cells

This article explains how to substitute part of a formula across all cells in a worksheet. It is easier than you think, no VBA programming or formulas are needed.

The picture above demonstrates a simple example, the formula in cell B3 gets values below 5 from sheet 2 cell range B3:B12.

**Array formula in cell B3**

I will now show you how to replace Sheet2 with Sheet3 in formulas, in all cells in Sheet1. Simply press CTRL and H to open the Find and Replace dialog box.

Press with left mouse button on the "Options" button to see all settings.

Here you have the option to

- Search the entire workbook or just the active worksheet. I want to search the active worksheet so I change nothing.
- Match entire cell contents. Deselect the check box, I want to match specific strings in formulas.

Press with left mouse button on in field "Find what:" and type Sheet2. Now press with left mouse button on in field "Replace with:" and type Sheet3, then press with left mouse button on "Replace All" button.

This will find all instances of Sheet2 in all cells and replace them with Sheet3.

Press with left mouse button on the "OK" button and then the "Close" button.

The array formula in cell B3 (Sheet1) changes to:

Recommended article

Recommended articles

Today I'll show you how to search all Excel workbooks with file extensions xls, xlsx and xlsm in a given folder for a […]

### Replace part of formula in a specific cell range

Simply select the cell range, press CTRL + H to open the Find and Replace dialog box.

The "Find and Replace" action will now be applied to cell range B3:B4.

### Replace n:th instance

**Array formula in cell B3 (Sheet1)**

To replace only the first instance of a specific search string in the formula simply include more characters so it makes the search string unique.

Example, you want to replace Sheet2 with Sheet3 but only the first instance found in the formula.

Press CTRL + H to open the Find and Replace dialog box.

Don't forget to add the included characters in the "Replace with: " field as well.

String IF(Sheet2 is found in only one location in each cell, this will replace only the first instance of Sheet2.

### Excel basics category

What is a reference in Excel? Excel has an A1 reference style meaning columns are named letters A to XFD […]

A non-contiguous list is a list with occasional blank cells and that makes it harder to select the entire cell […]

Have you ever wondered how these lines got there on a worksheet? They show where pages will break, in other […]

Excel has great built-in features. The following one lets you search an entire worksheet for formulas that return an error. […]

Selecting cell ranges in Excel can sometimes be a real pain scrolling forever it seems. There is a quick and easy […]

This article demonstrates how to select all blank cells in a given cell range and how to delete them. It […]

In this article, I am going to show you two ways on how to find blank cells. Both techniques are […]

In this smaller example, column D (Category) has empty cells, shown in the picture above. If your column contains thousands of […]

The Quick Access Toolbar is located at the very top of your Excel window, I highly recommend that you place your […]

The picture above shows data in column B, some cells contain nothing, they are blank. I will now go through […]

Use the following formula to convert a column number to a column letter: =LEFT(ADDRESS(1, B3, 4), MATCH(B3, {1; 27; 703})) […]

Making your sheets easy to read is a fundamental approach of creating useful worksheets. Your message must be crystal clear, […]

If your cell text is taking to much space Excel allows you to rotate text in any angle. Here are […]

The formula in column B returns a running count based on values in column C. Formula in cell B3: =IF(C3<>"",COUNTA($C$3:C3),"") […]

A number that is formatted as text will be left-aligned instead of right-aligned, this makes it easier for you to […]

### Text string manipulation category

Table of Contents Identify all characters in a cell value Identify all characters in a cell value - Excel 365 […]

### Text string manipultion category

Cell B3 contains a few odd characters and the formula in C3 shows the ANSI equivalent of each character in […]

This article demonstrates an array formula that extracts all characters except numbers from a cell, cell C3 contains the formula […]

## Functions in this article

More than 1300 Excel formulas

## Excel formula categories

## Excel categories

### Leave a Reply

### How to comment

**How to add a formula to your comment**

<code>Insert your formula here.</code>

**Convert less than and larger than signs**

Use html character entities instead of less than and larger than signs.

< becomes < and > becomes >

**How to add VBA code to your comment**

[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org or imgur

Paste image link to your comment.

**Contact Oscar**

You can contact me through this contact form