How to update values in one column that are linked in a different column?

benobee

New Member
Joined
Jul 7, 2002
Messages
44
Hi everyone

I have a query regarding updates to a column listing but unsure where to start with this.

I have a list of applications and servers. There is a multiple server to 1 application relationship.

When I make an update to one column, I would like Excel to automatically update the row wherever a duplicate entry of that application resides.

For example, in the table below, App3 exists on Server C and F. Therefore if I update the value in Cell F4 to Y, I would like to see the value in Cell F7 automatically change to Y. How would this be possible?

Appreciate any advice on this, many thanks!

Book2
ABCDEF
1ServerApplicationEnvironmentPhaseCountryComplete?
2AApp1TESTEMT-1bFRANCEN
3BApp2TESTEMT-1bFRANCEN
4CApp3TESTEMT-1bFRANCEN
5DApp4TESTEMT-1bFRANCEN
6EApp5TESTEMT-1bFRANCEN
7FApp3TESTEMT-1bFRANCEN
8GApp7TESTEMT-1bFRANCEN
Sheet1
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi, Try this:-
Right Click Sheet Tab, Select "View Code", Vb window appears.
Paste code Into Vb window.
Close Vb window.
To Run Code change a Value in column "F".
Code:
Private [COLOR="Navy"]Sub[/COLOR] Worksheet_Change(ByVal Target [COLOR="Navy"]As[/COLOR] Range)
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range
Application.EnableEvents = False
[COLOR="Navy"]If[/COLOR] Target.Column = 6 And Target.Count = 1 [COLOR="Navy"]Then[/COLOR]
    [COLOR="Navy"]Set[/COLOR] Rng = Range(Range("B1"), Range("B" & Rows.Count).End(xlUp))
        [COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
            [COLOR="Navy"]If[/COLOR] Cells(Target.Row, "B") = Dn.Value And Not Target.Row = Dn.Row [COLOR="Navy"]Then[/COLOR]
                Dn.Offset(, 4) = Target.Value
            [COLOR="Navy"]End[/COLOR] If
        [COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]End[/COLOR] If
Application.EnableEvents = True
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
NICE !!! Cheers Mick.

One further question - if I wanted an additional Column (Column G) which was to do exactly the same thing as Column F, how would I add to this code?

Thinking of having Column G to register when I close down the application.

Many thanks for your help with this so far, this is tremendous help.

Kind Regards

Ben
 
Upvote 0
Hi, Try this:-
Code:
Private [COLOR="Navy"]Sub[/COLOR] Worksheet_Change(ByVal Target [COLOR="Navy"]As[/COLOR] Range)
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range
Application.EnableEvents = False
[COLOR="Navy"]If[/COLOR] Not Intersect(Target, Columns("F:G")) [COLOR="Navy"]Is[/COLOR] Nothing And _
        Target.Count = 1 [COLOR="Navy"]Then[/COLOR]
    [COLOR="Navy"]Set[/COLOR] Rng = Range(Range("B1"), Range("B" & Rows.Count).End(xlUp))
        [COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
            [COLOR="Navy"]If[/COLOR] Cells(Target.Row, "B") = Dn.Value And Not Target.Row = Dn.Row [COLOR="Navy"]Then[/COLOR]
                Dn(, Target.Column - 1) = Target.Value
            [COLOR="Navy"]End[/COLOR] If
        [COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]End[/COLOR] If
Application.EnableEvents = True
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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