View Single Post
  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

Dave

Find bottom + 1 of column A.

Sub findbottom()
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
End Sub

The idea behind the code is to go down to the bottom of the column then work
up until you reach the last filled cell, then drop down to next cell, which is
empty.


Gord Dibben Excel MVP

On Thu, 14 Jul 2005 21:45:41 +0100, "Dave"
wrote:

I have a workbook with different sheets
I fill in data on the balance sheet
copy cheques data into sheet2, a list of all cheques &
copy invoice data into sheet3, a list of all invoices
I have recorded a macro and assigned it to a new button
for each of these tasks
The only problem is, after pasting the data into sheet 2 or 3
I need to move down to select the next empty cell before finishing so that
it is set up ready for the next use of the macro.
Recording the macro does this fine the first time but as it specifies the
actual cell selected it always returns to the same cell, hence it will only
paste into the first two cells.
I would like it to move down one cell from which ever cell is selected
without specifying the location can anyone tell me how to do this or how to
edit my original macro

Sub ChequesOut()
'
' ChequesOut Macro
' Macro recorded 14/07/2005 by D L
'

'
Selection.Copy
Sheets("Cheques").Select
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("D4").Select (THIS IS THE PROBLEM)
Sheets("Spreadsheet").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 43
End With
End Sub

Thanks to anyone who may endeavour to help
Dave