Moving around from Active Cells

Derek_35

New Member
Joined
Apr 21, 2002
Messages
25
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
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
the macro code to move right one cell would be

activecell.select
Selection.Offset(0, 1).Select
 
Upvote 0
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.
 
Upvote 0
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...
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,044
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top