VBA Code
Closed
                                    
                        Elly                    
                                    -
                            Feb  4, 2009 at 11:52 AM
                        
melnisson Posts 12 Registration date Saturday August 30, 2008 Status Member Last seen March 31, 2009 - Feb 4, 2009 at 02:07 PM
        melnisson Posts 12 Registration date Saturday August 30, 2008 Status Member Last seen March 31, 2009 - Feb 4, 2009 at 02:07 PM
        Related:         
- VBA Code
 - Cs 1.6 code - Guide
 - Vba case like - Guide
 - Samsung volume increase code - Guide
 - Excel online vba - Guide
 - Battery reset code - Guide
 
1 response
                
        
                    melnisson
    
        
                    Posts
            
                
            12
                
                            Registration date
            Saturday August 30, 2008
                            Status
            Member
                            Last seen
            March 31, 2009
            
            
                    4
    
    
                    
Feb 4, 2009 at 02:07 PM
    Feb 4, 2009 at 02:07 PM
                        
                    hi,
try this:
Set r = [A1] 'First cell of column with names to look for
Set r2 = [B1:B100] 'First cell of column with names to look in
Set r3 = [C1] 'New column created with names that do not exist in column B
Do Until r = ""
For Each rFound In r2
If rFound.Value = r.Value Then
NameFound = ""
Exit For
End If
       
If rFound.Value <> r.Value Then
NameFound = r.Value
End If
Next rFound
   
If NameFound <> "" Then
r3.Value = NameFound
Set r3 = r3.Offset(1, 0)
End If
   
NameFound = ""
Set r = r.Offset(1, 0)
 
Loop
i hope that it works for you.
            try this:
Set r = [A1] 'First cell of column with names to look for
Set r2 = [B1:B100] 'First cell of column with names to look in
Set r3 = [C1] 'New column created with names that do not exist in column B
Do Until r = ""
For Each rFound In r2
If rFound.Value = r.Value Then
NameFound = ""
Exit For
End If
If rFound.Value <> r.Value Then
NameFound = r.Value
End If
Next rFound
If NameFound <> "" Then
r3.Value = NameFound
Set r3 = r3.Offset(1, 0)
End If
NameFound = ""
Set r = r.Offset(1, 0)
Loop
i hope that it works for you.