Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 05-26-2017, 02:02 AM
jeffreybrown jeffreybrown is offline Auto populate cell based on certain situations Windows Vista Auto populate cell based on certain situations Office 2007
Expert
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Sorry for the delay, been traveling for business...

Try...

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    ActiveSheet.Unprotect Password:="aaa"
    Dim rng As Range
    Set rng = Target.Parent.Range("B16")
    If Target.Count > 1 Then Exit Sub
    If Intersect(Target, rng) Is Nothing Then Exit Sub
    With Range("B19:E19")
        Select Case Target.Value
        Case "No"
            .Value = 0
            .Locked = True
        Case "Yes"
            .Value = ""
            .Locked = False
        End Select
    End With
    ActiveSheet.Protect Password:="aaa"
End Sub
Reply With Quote
 

Tags
autopopulate



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto populate cell based on certain situations Excel to auto populate dates based on start and end patidallas22 Excel Programming 9 04-21-2014 03:14 PM
Auto populate cell based on certain situations trying to use vlookup to calculate several different situations in one cell heastlund Excel 3 11-21-2013 12:38 PM
Auto populate cell based on certain situations auto cell populate 2 Stevejd58 Excel 3 08-20-2013 04:23 PM
Auto populate cell based on certain situations auto cell populate Stevejd58 Excel 14 05-13-2013 02:22 AM
Auto-populate an MS Word table cell with text from a diff cell? dreamrthts Word Tables 0 03-20-2009 01:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft