Change target cell value

ANE0709

Board Regular
Joined
Feb 2, 2022
Messages
65
Office Version
  1. 365
Platform
  1. Windows
I have a code someone on here helped build. Now i need to add to it. Unfortunately I'm still not that good with change events. Add in: if intersecting column B = "City-HE" and column M = "1" then change cell value of M to "1*"

Here is the current code i need to add to for reference

Private Sub Worksheet_Change(ByVal Target As Range)
Dim U As Range
Set U = Union(Range("C:C"), Range("I:L"))
If Intersect(Target, U) Is Nothing Or Target.Row < 4 Then Exit Sub ' add
With Range(Cells(Target.Row, "A"), Cells(Target.Row, "P")).Interior
Select Case True
Case U(Target.Row, 1) = "GC" ' 1st priority
.Color = 5296274
Case U(Target.Row, 7) <> 0 '' 2nd priority
.ColorIndex = 6
Case U(Target.Row, 8) <> 0 And U(Target.Row, 10) <> 0 ' 3rd priority
.ColorIndex = 39
Case Else
.Color = xlNone 'other
End Select
End With
End Sub
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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