![]() |
Matching Data in VB
I have a query onto our AS400, & I want to remove some
rows after updating, the actual removal of the rows is ok, I was just wondering if there was a "contains" function in VB that would allow me to do something like... If activecell.value contains "Obselete" then yada yada yda In the time It has taken me to fire up IE and write this I could have written something to run along the string and look for the values, but I figured it beter to try and improve myself !!!!!! |
Matching Data in VB
Hi Neil,
If I understand you correctly, there are a couple of ways to do this, the most efficient being: If ActiveCell.Value Like "*Obsolete*" Then ''' Do something. End If -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Neil" wrote in message ... I have a query onto our AS400, & I want to remove some rows after updating, the actual removal of the rows is ok, I was just wondering if there was a "contains" function in VB that would allow me to do something like... If activecell.value contains "Obselete" then yada yada yda In the time It has taken me to fire up IE and write this I could have written something to run along the string and look for the values, but I figured it beter to try and improve myself !!!!!! |
Matching Data in VB
"Neil" wrote in message ... I have a query onto our AS400, & I want to remove some rows after updating, the actual removal of the rows is ok, I was just wondering if there was a "contains" function in VB that would allow me to do something like... If activecell.value contains "Obselete" then yada yada yda In the time It has taken me to fire up IE and write this I could have written something to run along the string and look for the values, but I figured it beter to try and improve myself !!!!!! If you wish to check for a particular value with a cell you can use the instr function longreturn = InStr([start, ]string1, string2[, compare]) e.g. If instr(1,Activecell.text,"Obsolete")<0 then do my stuff End If Keith |
All times are GMT +1. The time now is 03:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com