View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Insert Column w/ Equation - Fill to bottom

hi,
insert this code after you add columns and equation.
Range("b2").Copy
Range(Range("b2"), Range("b2").Offset(0, -1) _
.End(xlDown).Offset(0, 1)).PasteSpecial xlPasteAll

regards
FSt1

"mkerstei" wrote:


I have a series of excel spreadsheets that come in the same format, but
there are varying numbers of rows. I have to add four columns with
equations in each to be run on the existing data. I know how to add
the columns. I cannot get the equation to fill to the bottom of where
the existing data is. For example, existing data covers range A2:A24
in Spreadsheet 1 and A2:A29 in Spreadsheet 2. I have code that inserts
a column with an equation next to A in B2 on spreadsheet 1, but I cant
write the code that will fill that equation to B24 on SS 1 and to A29
in SS 2. I know this is confusing, but hopefully someone can help.


--
mkerstei
------------------------------------------------------------------------
mkerstei's Profile: http://www.excelforum.com/member.php...o&userid=25688
View this thread: http://www.excelforum.com/showthread...hreadid=548718