Unlock cell in E based on value in Col D. HOW?

Mister H

Well-known Member
Joined
Mar 6, 2002
Messages
1,507
Hi:

I need to get a peice of code that will look on a sheet titled:

Estreated (INFO)

in a range named:

IFIS_Status (D3:D27)

IF the cell value in D3 is: To be entered in IFIS by MAG then unlock cell E3 otherwise keep cell E3 locked.

Then check cell D4 etc...

Any suggestions? I had played around a bit with a change event but it doesn't really work that well as the sheet containing the named range is being populated via formulas.

Any suggestions?

THANKS,
Mark
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
In case it matters I had tried this but like I say it doesn't work when the sheet gets auto poppulated :confused:

HOPEFULLY someone can suggest a code for me.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Unlocks Cells Based on Input on Input Sheet Column D
Application.ScreenUpdating = False
    If Target.Count > 1 Then Exit Sub
    If Target.Row < 2 Then Exit Sub
    If Target.Column <> 4 Then Exit Sub
    
    ActiveSheet.Unprotect
    
Select Case Target
   
Case "To be entered in IFIS by MAG"
      Target.Offset(0, 1).Locked = False
     
     
Case "Entered in IFIS by NTRMB"
     Target.Offset(0, 1).Locked = False
     
End Select
    ActiveSheet.Protect
End Sub

THANKS,
Take Care,
Mark
 
Upvote 0
You could try using the Worksheet_Calculate() event instead

If the code works for you, the issue is about how to trigger it. You might also try that worksheet_activate, or a workbook-level event instead
 
Upvote 0
THANKS for the input baitmaster. :)

I will try your suggestions out. I have never used those events before but I will see how (if) they work.

TANKS Again,
Mark :biggrin:
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,735
Members
452,939
Latest member
WCrawford

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