Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have named in excel 70 cells - I have named them LAST1, LAST2,..., LAST70.
They are in the same column, one underneath the other. I want to use the following bit of code: ActiveCell.formula = "=SUMIF(D7:LAST,""IS"",D8:LAST1)" on the right hand side of each cell (as where these "LAST" cells will change on diffferent worksheets). Instead of me typing this formula out 70 times, is there a way of defining the names? I've tried the following way: Dim i For i = 1 To 70 ActiveCell.formula = "=SUMIF(D7:LAST,""IS"",D8:LASTi)" ActiveCell.Offset(1, 0).Select for next i This will allow me to enter the formula in each cell right hand side of the Named ones - but VBA doesn't like how I've definied this variable "i" in the formula. I've tried &i, putting it in "", putting spaces, but I either get errors in VBA or NAME? in the cell Any help? -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to keep names defined after a copy? | Excel Discussion (Misc queries) | |||
NAMES DEFINED | Excel Discussion (Misc queries) | |||
List of defined names | Excel Worksheet Functions | |||
Defined names | Excel Discussion (Misc queries) | |||
Using non defined names from another sheet | Excel Worksheet Functions |