Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Moving around from Active Cells

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If I search for a word (in a macro) and it is found in cell A3, is there a way to move up/down/left/right from that cell?

    Also, I am having problems with the If/else syntax.

    If (x=3 OR x=10) then

    That OR syntax doesnt seem to work for me...

    [ This Message was edited by: Derek_35 on 2002-04-30 16:39 ]

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Sydney/Brisbane , Australia
    Posts
    542
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    the macro code to move right one cell would be

    activecell.select
    Selection.Offset(0, 1).Select

  3. #3
    Board Regular s-o-s's Avatar
    Join Date
    Apr 2002
    Location
    Kissimmee, Florida
    Posts
    384
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    After your find do

    Activecell.offset(row,Col)

    can be + or - row numbers.

    On the Or front...Try if X=3 or x = 10 without the brackets.

    failing that...try highlighting OR and do F1 calling up help and reviewing the examples on the VB help.
    Hope This Helps.
    Sean.
    Digest of Homes

    WinXP, XL XP

  4. #4
    New Member
    Join Date
    Apr 2002
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I apologize for these simple questions that can be found under help. For some reason, when I installed Office XP I forgot to install the Help and my XP cd is at home 4 hours away...

  5. #5
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    one solution is (x=3) or (x=11)
    the other solution is to just drop the brackets.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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