Copy/paste dynamic # over as "text", then auto-update "text" number if dynamic # becomes larger?

Bret1

Board Regular
Joined
Jun 14, 2013
Messages
158
Hello,
I have a file I open and save everyday. I have a column with dynamic numbers (s10:s50). I'd like to keep track of the highest numbers for each row down column (S)...
If I copy column (s) over to column (t) as static text, is there a way to make a condition for each cell in column (t) to update it to the column (s) number if column (s) number turns greater than the static column (t) number? So, column (s) will show dynamic numbers, and column (t) will show the highest number column (s) has ever shown. Thanks!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,896
Put this code in the codepage of the worksheet that holds the data. It will update T10:T50 if any cell in S10:S50 changes and is greater than the T-column value in the same row.

VBA Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rngCell As Range
    If Not Intersect(Target, Range("S10:S50")) Is Nothing Then
        For Each rngCell In Range("S10:S50")
            If rngCell.Value > rngCell.Offset(0, 1).Value Then rngCell.Offset(0, 1).Value = rngCell.Value
        Next
    End If
End Sub
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,533
Messages
5,854,291
Members
431,636
Latest member
shabbas313

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
Top