Jump to content

Recommended Posts


     I am trying to delete a cell in excel if  a cell contains a key word.   The cell also has other text.   I use this if the cell only contains a single word.

For $a = 1 To $aLastRow
    $aCell = _Excel_RangeRead($oWorkbook, Default, "K" & $a)
    If $aCell = "APT" Then _Excel_RangeInsert($oWorkBook.Activesheet, "K" & $a, $xlShiftToRight)

So this works great but only if that cell only contains "APT".  How would I do this so that if the cell contains APT 1  or APT 2 and so on it would still do the delete?  In VBS there is a "like" command.   What is the syntax for like in  AutoIt?   I tried   $aCell.Value.like   but AutoIt does not like that.  Gives me a syntax error

Thank you

Edited by xcaliber13
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...