Thread: VBA question
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ducky ducky is offline
external usenet poster
 
Posts: 27
Default VBA question



On Oct 9, 2:43 pm, "aggiechick717" wrote:
I have a list of data that changes everytime someone runs their excel
spreadsheet. ( It is populated by another software taht we us for our
database.) I want to be able to find the first blank cell (where the
list of data ends) and enter a calculation there. How can I do this
within vba? I want to find the first blank cell and enter a formula
there, I have tried everything!! Thanks in advance!


Assuming that there will never be an empty cell until the bottom of
your list, and that your data is in column A (if not - adapt
accordingly):

application.worksheetfunction.counta(activesheet.r ange("A:A")) + 1 is
the row number of your first empty cell. meaning that:

activesheet.range("A" &
application.worksheetfunction.counta(activesheet.r ange("A:A")) +
1).value = YOUR FORMULA

HTH

AR