Input Qeustion

GoKu

Board Regular
Joined
Dec 18, 2007
Messages
244
Hi All, I have 2 Collumns K & L. What I need is the following: If "6" is inserted into L, K must also then show "6" in the corresponding row, but if "6" is inserted into K, it must only show in K. Thnx

Excel Workbook
KL
9Air Loader Driver:HP Loader Driver:
106
116
126
Data
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Code way:

RIght click worksheet tab, View Code, paste this:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = Cells(1, "L").Column Then
    If Target.Value = 6 Then Me.Cells(Target.Row, "K") = 6
End If
If Target.Column = Cells(1, "K").Column Then
    If Target.Value = 6 Then Me.Cells(Target.Row, "L").ClearContents
End If
Application.EnableEvents = True
End Sub
 
Upvote 0
Try:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("K10:L" & Rows.Count)) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
If Target.Column = 12 Then Target.Offset(0, -1) = Target.Value
End Sub

Dom
 
Upvote 0

Forum statistics

Threads
1,203,213
Messages
6,054,200
Members
444,708
Latest member
David R__

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