VBA - Leave Warning and Leave Value As Is (One More column)

Oranjin

Board Regular
Joined
Mar 16, 2016
Messages
81
Hello,

I am using the following code below. I would like it to leave the value as is in column F as well. I can't configure it to do that though. It currently leaves the values as is in columns D, E,
K, and L but it won't do it w/ F.

I would also like to add something that goes to the target line, and says, "are you sure this is the this is the person you would like to delete? and only after clicking "Yes" will the macro then operate.

If someone could even just help me w/ the F thing I would be appreciative. The going w/ this stuff is slow.

Code:
[COLOR=#333333]Private Sub Worksheet_Change(ByVal Target As Range)[/COLOR]If Target.Cells.Count > 1 Then Exit Sub
Dim rw As Long, fn As Range
Application.EnableEvents = False
    If Not Intersect(Target, Range("Entry")) Is Nothing Then
        Set fn = Range("J:J").Find(Target.Value, , xlValues, xlWhole)
            If Not fn Is Nothing Then
                rw = fn.Row
                'Range("B" & rw).Resize(1, 11).ClearContents
                Range("B" & rw).Resize(1, 2).ClearContents
                Range("F" & rw).Resize(1, 5).ClearContents
                Range("B" & rw) = "Open"
                'Range("D" & rw) = "4"
                'Range("E" & rw) = "NW"
                Range("G" & rw) = "Open Slot"
                Range("J" & rw) = "open Slot"
                'Range("K" & rw) = "4030"
                'Range("L" & rw) = "West 86"
            End If
    End If
Application.EnableEvents = True [COLOR=#333333]End Sub[/COLOR]
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Oranjin

Board Regular
Joined
Mar 16, 2016
Messages
81
Currently the data looks like

ABCDEFGHIJKLMNO
12DepartmentsTeams660 Floor660 QuadSamaccountnameSeat TypeFirst Name
Last NameDisplay NameStation LocationWorkstation Power pors
13FinanceB2NESteve.SteveStewardSteveSteveSteve Steve4258West 73
14Formula here

<tbody>
</tbody>
The formula that is being removed is currently in F:14
 
Upvote 0

Forum statistics

Threads
1,191,204
Messages
5,985,270
Members
439,953
Latest member
suchitha

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