View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Check to see if cell is blank

1. Post ALL of your code for comments
2. Is there data in col a below where you think the next blank cell should
be or will there just be blanks below.

sub copytonar()'copies to last available row in col A
lr=cells(rows.count,1).end(xlup).row +1
if len(application.trim(range("a9")))<1 then lr =9
range("c2:c22").copy cells(lr,1)
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Munchkin" wrote in message
...
I want my macro to first check & see if A9 is blank. If it is I want to
paste copied data in A9, if it is not blank I want to proceed with finding
the 1st blank cell in column A and pasting there (which is how the macro
is
set up)


Range("A9").Select
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1).Activate

ActiveSheet.Paste
Columns("D:D").EntireColumn.AutoFit