Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default want to advanced to cell on the right but my code won't work

Hi

What my macro should do is move to the next cell to the right when the
current cell is occuiped.

sample of my data
A1 A2
C1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default want to advanced to cell on the right but my code won't work

Sub CellToRight()
'moves to the right if active cell is empty
ActiveCell.Select
If ActiveCell = "" Then
MsgBox "Empty"
' your code
Else
MsgBox "Move to the next cell to the right"
ActiveCell.Offset(0, 1).Select
End If

End Sub

" wrote:

Hi

What my macro should do is move to the next cell to the right when the
current cell is occuiped.

sample of my data
A1 A2
C1


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vb code for renaming a work sheet with a cell reference John Britto Excel Discussion (Misc queries) 3 September 17th 06 07:12 PM
Wildcards in Advanced filter criteria don't work with Excel 2003 Inconceivable Excel Programming 4 July 15th 05 02:49 AM
Advanced Sorting\VBA Code fugfug Excel Programming 3 July 6th 05 03:30 PM
Advanced Filter does not work in this one Krish[_3_] Excel Programming 1 January 13th 04 10:10 PM


All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"