# How do I replace all cell references with another one when they appear multiple times in an expression?

#### FSAEStudent

##### New Member
For example here is the expression i got:
=(IF(((4*F4*F5*J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18*B10))<=((B7+B15+(4*B5*B9*F4*F5/(B5*B8*B10)*(((J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18))+(K5*K8*K11*K15*((F10/2)-(F11/F9))/(F10*G18)))))*B12),((4*F4*F5*J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18*B10)),(IF(((4*F4*F5*J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18*B10))<=((B7+B15+(4*B5*B9*F4*F5/(B5*B8*B10)*(((J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18))+(K5*K8*K11*K15*((F10/2)-(F11/F9))/(F10*G18)))))*B12),0,(B7+B15+(4*B5*B9*F4*F5/(B5*B8*B10)*(((J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18))+(K5*K8*K11*K15*((F10/2)-(F11/F9))/(F10*G18)))))*B11)))+IF((4*F4*F5*K5*K8*K11*K15*((F10/2)-(F11/F9))/(B10*F10*G18))<=((C7+C15-(4*B5*B9*F4*F5/(B5*B8*B10)*(((J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18))+(K5*K8*K11*K15*((F10/2)-(F11/F9))/(F10*G18)))))*C12),(4*F4*F5*K5*K8*K11*K15*((F10/2)-(F11/F9))/(B10*F10*G18)),(IF((4*F4*F5*K5*K8*K11*K15*((F10/2)-(F11/F9))/(B10*F10*G18))<=((C7+C15-(4*B5*B9*F4*F5/(B5*B8*B10)*(((J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18))+(K5*K8*K11*K15*((F10/2)-(F11/F9))/(F10*G18)))))*C12),0,(C7+C15-(4*B5*B9*F4*F5/(B5*B8*B10)*(((J5*J8*J11*J15*((F10/2)+(F11/F9)))/(F10*F18))+(K5*K8*K11*K15*((F10/2)-(F11/F9))/(F10*G18)))))*C11))))/B5

I need to replace all the cell references of "F4" to "O\$3" in one action, how do I do this?

#### Fluff

##### MrExcel MVP, Moderator
Hi & welcome to MrExcel.
Select the cell with the formula & use the Replace function (Ctrl H) put F4 in the Find box & O\$3 in the Replace box.
Then in options make sure that "Match entire cell" is unchecked & "Look in" is set to Formulas
Then click "Replace"

1,081,456
Messages
5,358,798
Members
400,513
Latest member
sdrowsick

### This Week's Hot Topics

• VBA (Userform)
Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
• List box that changes fill color
Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
• Remove duplicates and retain one. Cross-linked cases
Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
• VBA Copy and Paste With Duplicates
Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
• Macro
is it possible for a macro to run if the active cell value is different to the value above it
• IF DATE and TIME
I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...