Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I assume you actually meant B1-A1 in cell C1 otherwise I think you'd get
circular references. One way: Range("C1").AutoFill _ Destination:=Range("C1:C" & Range("B1").End(xlDown).Row), _ Type:=xlFillDefault Regards Trevor "Todd" wrote in message ... I hope this is an easy question. I can't seem to figure it out. I have a very simple spreadsheet that I am writing a macro for. Basically, I have written a formual in colum C that says, =B1 - C1, then copied it down all the rows of Column C. A B C 21 55 34 Question is, when I apply this macro to spreadsheets of varying lengths, it doesn't stop at the last value. How do I specify the range so this will work on spreadsheets of different sizes? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Macro | Excel Worksheet Functions | |||
macro or formula | Excel Programming | |||
Formula expected end of statement error, typing formula into cell as part of VBA macro | Excel Programming | |||
Macro Formula | Excel Discussion (Misc queries) | |||
can I add to a formula in a macro? | Excel Programming |