Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
using VB code, i need to move over to the right 1 cell.
For example, i search for something and it finds it in cell b1, i nee a script that will then highlight the cell in c1. Sometimes, though the item i search for can be in cell D46 or a rando area.. -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I fixed my dilemma...
here's the code: ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See the VBA help for Offset
Try something like this Sub test() On Error GoTo a Range("a1:a100").Find("ron").Offset(0, 1).Select Exit Sub a: MsgBox "nothing found" End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "alexm999 " wrote in message ... using VB code, i need to move over to the right 1 cell. For example, i search for something and it finds it in cell b1, i need a script that will then highlight the cell in c1. Sometimes, though the item i search for can be in cell D46 or a random area... --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Whats the script for the following:
If I look for a something and it's not there, what can i use to do nothing and look for something else? --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try Something like this
Sub test() Dim rng As Range On Error Resume Next Set rng = Range("a1:a100").Find("ron") If rng Is Nothing Then Set rng = Range("a1:a100").Find("dave") End If If Not rng Is Nothing Then rng.Offset(0, 1).Select Else MsgBox "nothing found" End If End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "alexm999 " wrote in message ... Whats the script for the following: If I look for a something and it's not there, what can i use to do nothing and look for something else? --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Arrow keys moving whole excel sprdsht insted of from cell to cell | New Users to Excel | |||
Arrow keys move screen instead of moving from cell to cell | Excel Discussion (Misc queries) | |||
Moving cell contents to new cell loses background color in old cel | Excel Discussion (Misc queries) | |||
Arrows not moving from cell to cell, when I push arrow columns m | Excel Discussion (Misc queries) | |||
Force user to enter data in cell before moving to next cell | New Users to Excel |