Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I know that this is a simple question, but I can't find the answer. I have the VB code to find a cell in a worksheet. I would then like to have the adjacent cell to the right highlighted. What is the code for that? Thanks B |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim Foundcell as range
set foundcell = yourfindgoeshere if foundcell is nothing then beep else foundcell.offset(0,1).select end with (assuming you're finding on the activesheet.) Bstice wrote: Hello, I know that this is a simple question, but I can't find the answer. I have the VB code to find a cell in a worksheet. I would then like to have the adjacent cell to the right highlighted. What is the code for that? Thanks B -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like
Dim FoundCell As Range Set FoundCell Cells.Find(....) If Not FoundCell Is Nothing Then FoundCell(1,2).Select End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting LLC www.cpearson.com (email on the web site) "Bstice" wrote in message ... Hello, I know that this is a simple question, but I can't find the answer. I have the VB code to find a cell in a worksheet. I would then like to have the adjacent cell to the right highlighted. What is the code for that? Thanks B |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If your VB code identifies a cell:
rngFoundCell.Offset(, 1).Select If it just selects a cell: ActiveCell.Offset(, 1).Select __________________________________________________ ______________________ "Bstice" wrote in message ... Hello, I know that this is a simple question, but I can't find the answer. I have the VB code to find a cell in a worksheet. I would then like to have the adjacent cell to the right highlighted. What is the code for that? Thanks B |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to become a lot faster to beat Dave and Chip!
__________________________________________________ ______________________ "Vasant Nanavati" <vasantn AT aol DOT com wrote in message ... If your VB code identifies a cell: rngFoundCell.Offset(, 1).Select If it just selects a cell: ActiveCell.Offset(, 1).Select __________________________________________________ ______________________ "Bstice" wrote in message ... Hello, I know that this is a simple question, but I can't find the answer. I have the VB code to find a cell in a worksheet. I would then like to have the adjacent cell to the right highlighted. What is the code for that? Thanks B |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically move to adjacent cells without hitting Enter | Excel Discussion (Misc queries) | |||
move to adjacent cell with panes frozen | Excel Discussion (Misc queries) | |||
How to Automatically Move Cell datato adjacent cell.. | Excel Discussion (Misc queries) | |||
tab does not move to adjacent cell in excel | Excel Discussion (Misc queries) | |||
excel tab key to move to right adjacent cell | Excel Discussion (Misc queries) |