Hi,

Try this line of code:

 

Cells(ActiveCell.Row, Columns.Count).End(xlToLeft).Offset(0, 1).Select

 

Regards - Dave.
 
> Date: Thu, 29 Jul 2010 05:27:59 -0700
> Subject: $$Excel-Macros$$ create macro to find first empty row
> From: federico.mazz...@ikea.com
> To: excel-macros@googlegroups.com
> 
> i need to create a macro which put the cursor in the first empty cell
> in the same row of the actual active cell. i tried to use a for cycle
> but it doesn't work, could you please help me?
> 
> Dim sh As Worksheet
> Dim lColonna As Long
> Dim row As Range
> Set sh = Worksheets("sheet1")
> ActiveCell.Offset(-1, 1).Select
> Set row = ActiveCell.row.Select
> With sh
> For lColonna = 1 To .Columns.Count
> 
> If .Cells(row, lColonna).Value = "" Then
> 
> Sheets("sheet1").Select
> Cells(row, lColonna).Select
> 
> Exit For
> End If
> Active.cell.Offset(1, 1).Select
> Next
> End With
> 
> -- 
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links : 
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> 
> To post to this group, send email to excel-macros@googlegroups.com
> 
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
> 
> We reach over 7000 subscribers worldwide and receive many nice notes about 
> the learning and support from the group.Let friends and co-workers know they 
> can subscribe to group at 
> http://groups.google.com/group/excel-macros/subscribe
                                          

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to