Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions Mike Barlow Excel Worksheet Functions 7 May 21st 23 07:42 PM
INDIRECT function to reference a named range iperlovsky Excel Worksheet Functions 2 November 6th 09 06:09 AM
Use of Indirect in Defined Name Frank Excel Discussion (Misc queries) 5 January 8th 09 09:40 PM
Define chart range using indirect reference Thomas Charts and Charting in Excel 3 May 10th 06 09:44 PM
Can I reference a dynamic range within a indirect statement? BCW Excel Programming 1 December 24th 04 01:06 AM


All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"