Easy Excel Question

JayFromBoston

New Member
Joined
Nov 27, 2018
Messages
6
I want every "26" to be replaced with the value in cell i2. See image. How do I do that?
Screenprint18.jpg
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
If you add another cell that can put the original number to replace it with, than you can do something like this:

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim lastRow As Long
If Target.Address = "$E$2" Then
    lastRow = Cells(Rows.Count, "B").End(xlUp).Row
    Range("B2:B" & lastRow).Replace What:=Range("E1"), Replacement:=Range("E2"), LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
        Range("E1").Value = Range("E2").Value
End If
End Sub

Snag_155a8245.png
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,572
Members
448,972
Latest member
Shantanu2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top