Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help using indirect to reference a defined range in another spread
The indirect is pointing to the cell that has the name of the defined range
that is referenced to another file. Thanks Sub Add_Data_Pull_Formulas_New() Application.ScreenUpdating = False Application.Calculation = xlManual Current_Sheet = ActiveSheet.Name Set RangeToCheck = ActiveCell.CurrentRegion Set NewRange = Range(RangeToCheck.Cells(8, 2), RangeToCheck.Cells(RangeToCheck.Rows.Count, RangeToCheck.Columns.Count)) ActiveWorkbook.Names.Add Name:=Current_Sheet, RefersToR1C1:=NewRange With Range(Current_Sheet) .FormulaR1C1 = "=SUMIF(NDIRECT(R5C),RC1,OFFSET(NDIRECT(R5C),0,R1C ,ROWS(NDIRECT(R5C)),1))" .Value = .Value End With Application.Calculation = xlAutomatic Application.ScreenUpdating = True End Sub -- Helping Is always a good thing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions | Excel Worksheet Functions | |||
INDIRECT function to reference a named range | Excel Worksheet Functions | |||
Use of Indirect in Defined Name | Excel Discussion (Misc queries) | |||
Define chart range using indirect reference | Charts and Charting in Excel | |||
Can I reference a dynamic range within a indirect statement? | Excel Programming |