Thread: Copy formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default Copy formula

Hi ,
You want to use Ctrl+D see
http://www.mvps.org/dmcritchie/excel/fillhand.htm
http://www.mvps.org/dmcritchie/excel/shortx2k.htm
but if you are recording a macro, the generated code from Ctrl+D
is not going to do you much good.

For a programming solution to act similar to Ctrl+D, see
http://www.mvps.org/dmcritchie/excel/filld.htm

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"A Waller" <A wrote in message ...
Hello!

I'm modifying an existing macro. Within the macro, there is a formula that
needs to be copied until the information from the previous column ends. Since
the column the formula is actually in starts out blank, how do I tell Excel
to stop when the information does? Right now, I've tried shift down but it
copies zeros down the rest of the column. Can anyone help?