Excel 2003 VB Macro for finding txt strings
Closed
                    
        
                    swt
    
        
                    Posts
            
                
            1
                
                            Registration date
            Tuesday May  5, 2009
                            Status
            Member
                            Last seen
            May  6, 2009
            
                -
                            May  6, 2009 at 11:32 AM
                        
psk - May 17, 2009 at 07:45 PM
        psk - May 17, 2009 at 07:45 PM
        Related:         
- Excel 2003 VB Macro for finding txt strings
- Excel mod apk for pc - Download - Spreadsheets
- Excel online macros - Guide
- Kernel for excel repair - Download - Backup and recovery
- Excel run macro on open - Guide
- Vb net find last row in excel sheet - Guide
2 responses
                        
                            
                    Hi,
Have you tried using the SEARCH function? This function returns the index of the first occurence of the word within a string. To get the logical value (True or False) instead of the index, you can compare the return value of SEARCH function to be greater than zero.
HTH
Happy coding!
psk
            Have you tried using the SEARCH function? This function returns the index of the first occurence of the word within a string. To get the logical value (True or False) instead of the index, you can compare the return value of SEARCH function to be greater than zero.
HTH
Happy coding!
psk
                        
                    Apologies, missed the fact that you need the *VBA* function for the macro and *not* the excel function for the formulas. You can use INSTR function in the VBA macro to achieve the same.
In addition, any Excel formula can be evaluated by passing the formula as string as a parameter to EVALUATE function in VBA. Hence, using EVALUATE, you can evaluate SEARCH function in the VBA macro too.
- psk
            In addition, any Excel formula can be evaluated by passing the formula as string as a parameter to EVALUATE function in VBA. Hence, using EVALUATE, you can evaluate SEARCH function in the VBA macro too.
- psk
