+ Reply to Thread
Results 1 to 5 of 5

Macro to auto Update values in different sheets

Hybrid View

feroguz Macro to auto Update values... 07-18-2012, 11:51 AM
xladept Re: Macro to auto Update... 07-18-2012, 11:59 AM
feroguz Re: Macro to auto Update... 07-18-2012, 12:27 PM
nilem Re: Macro to auto Update... 07-18-2012, 01:13 PM
feroguz Re: Macro to auto Update... 07-18-2012, 04:24 PM
  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    99

    Question Macro to auto Update values in different sheets

    Hi masters!!, It's Wednesday! !

    I've searched the information, but cann't find how to auto update if I change a value in the cells.

    For example:
    If I have a value on Sheet 3 and modified it (Name), I need a function that find the old value that had originally and replace it on the sheet 2, is this possible?


    attach the file for more explication..

    Thanks a lot!
    Best Regards!
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to auto Update values in different sheets

    On Sheet 2 B11:

    =Sheet3!B4
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Macro to auto Update values in different sheets

    Thanks for the help..!

    but if I have the same value in multiple cells in the sheet 2 would not be useful .. any ideas?

    Best Regards!

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro to auto Update values in different sheets

    Hi Feroguz, try it
    Option Explicit
    Dim OldName$
    
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Target.Column <> 2 Then Exit Sub
    OldName = Target.Value
    End Sub
    
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Target.Column <> 2 Then Exit Sub
    If OldName = vbNullString Then Exit Sub
    Dim r As Range
    Set r = Sheets("Sheet2").UsedRange.Columns(2).Find(OldName, lookat:=xlWhole)
    If Not r Is Nothing Then r.Value = Target.Value
    End Sub
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-06-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Macro to auto Update values in different sheets

    Dear Amigo Nilem! Works Fine!!

    I send you a PM.

    Thanks a lot!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1