+ Reply to Thread
Results 1 to 5 of 5

For i Searching for <> several criteria

  1. #1
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Question For i Searching for <> several criteria

    Hi all,

    Is there a way i can do the following:

    Please Login or Register  to view this content.
    When i try this it debugss the 2nd line i think its because of the "or".

    so how would i go about this without writing loads of ifs?

    If possible of course

    Cheers Folks
    Mr MaGoo
    Magoo.Inc MMVII

    If i've helped please add to my Rep by Clicking on the Blue Scales in the top right hand corner of the post

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Please Login or Register  to view this content.
    as every cell will not be equal to A or B, so you need ands

    However I am not sure what you want to do with the loop, as there is nothing to change the activecell to another cell

    perhaps you need a line before the next line. Althought exactly what depends on what you want to do

    ActiveCell.Offset(1, 0).Select

    if you wish to move to the cell below the previous active cell

    Also you have a typo Activececell.value should be activecell.value

    Regards

    Dav

  3. #3
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Thumbs up Cheers

    Yeah i know there was no real instructions in the loop it was just an example i typed into the post.

    i want this for searching strings and manipulating offset cells

    Cheers buddy!!

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I prefer Select case for such examples

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Thumbs up Oh yeah

    You know it's amazing how many times you just don't think of things isn't it.

    thats neat and quick i like it Roy!!

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1