Data Validation
Closed
                                    
                        Gagan                    
                                    -
                            Apr 25, 2010 at 02:28 AM
                        
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 25, 2010 at 08:03 PM
        rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 25, 2010 at 08:03 PM
        Related:         
- Data Validation
 - Display two columns in data validation list but return only one - Guide
 - Windows genuine validation - Guide
 - Tmobile data check - Guide
 - Data transmission cable - Guide
 - Download facebook data - Guide
 
1 response
                
        
                    rizvisa1
    
        
                    Posts
            
                
            4478
                
                            Registration date
            Thursday January 28, 2010
                            Status
            Contributor
                            Last seen
            May  5, 2022
            
            
                    766
    
    
                    
Apr 25, 2010 at 08:03 PM
    Apr 25, 2010 at 08:03 PM
                        
                    You need to define this function in the sheet in which you want to have this 
Private Sub Worksheet_Change(ByVal Target As Range)
End Sub
Lets say your drop down is in column A, then you have some thing like this
End Sub
            Private Sub Worksheet_Change(ByVal Target As Range)
End Sub
Lets say your drop down is in column A, then you have some thing like this
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column <> 1 Then Exit Sub
    
    If UCase(Target) = "YES" Then
        
        Target.Offset(0, 1) = 1
    
    ElseIf UCase(Target) = "NO" Then
        
        Target.Offset(0, 1) = 0
    
    Else
        
        Target.Offset(0, 1) = ""
    End If
    
    
End Sub