INDIRECT Not Working For Dynamic Named Range In SUMPRODUCT

Feb 11, 2012

The formula is =SUMPRODUCT((Group="A")*(Project_Description="Long Term")*(Profile="B")*(INDIRECT(B9)="x"))

B9 through M9 have header text Jan_2012, Feb_2012...Dec_2012. Basically my aim is to get the above formula working before I drag it across so that the named ranges get picked up automatically from the headers.

Jan_2012 thru Dec_2012 are dynamic named ranges using INDEX (and not OFFSET as someone mentioned OFFSET is a volatile function).

The above SUMPRODUCT formula is giving me a #REF! error for the (INDIRECT(B9)="x") part. I know that because when I replace it with (Jan_2012="x") it works fine.

I realized while writing this that it may be because the named range in Jan_2012 is not the same size as that of other arrays. [but it is the same size - I've re-confirmed just now]

View 5 Replies


ADVERTISEMENT

Indirect Using Dynamic Range Not Working

Dec 27, 2012

In the example I have attached there are two sheets, Details and DataTables. There are also a number of named ranges, both static and dynamic, that refer to data on the DataTables sheet. Most of the static ranges were added for debugging purposes. The tables have been shortened for this example.

On the Details sheet column A has a drop down that allows you to select the make of a device. Column B builds its drop down list based on what is selected in column A. The data validation in B2 uses a named dynamic range and the drop down does not work. The data validation in C2 used a named static range and the drop down works.

Column C will fill in the RU value based on what is selected in column B. Cell C3 uses named dynamic range and it does not work. Cell C4 uses named static range and it works.

I would like to used named dynamic ranges if possible so when data is added to the tables the named dynamic ranges will self adjust. Can what I want to do be done?

Dynamic Range.xlsx

View 8 Replies View Related

SUMPRODUCT / INDIRECT Functions Not Working With ROW Reference When Combined

Apr 4, 2014

Basically I have an equation:

=SUMPRODUCT(G9:G11,H9:H11)/SUM(G9:G11)

It's just a simple percentage calculator for my purposes and works fine as is. However, I want to make it dynamic whereby from a user input the length of the array will increase or decrease, e.g. G9-G11 will become G9-G12 if there are four rows occupied with data. For all my other SUMming equations I have solved this and even came up with what I think is a perfectly valid solution for this one. The one problem is that it doesn't work when combined into a single equation.

My solution for the upper part of the fraction is this:

"A1"=SUMPRODUCT(INDIRECT("G9:G"&MIN(ROW(G9)+A8-1)),INDIRECT("H9:H"&MIN(ROW(H9)+A8-1)))

Where the user inputs the number of rows used in A8.

The solution for the lower part of the fraction is this:
"A2"=SUM(INDIRECT("G9:G"&ROW(G9)+A8-1))

[code]....

View 3 Replies View Related

INDIRECT And Dynamic Named Ranges

Feb 3, 2010

I have a dynamic named rage "AREA" which can contains values like "Area1, Area2, Area3, ..."

For each item in list AREA I have another dynamic named range, named exactly as the item, so for example I have a dynamic named range "AREA1" with values "SubArea1.1, SubArea1.2, ..." and also a dynamic named range "AREA2" with values "SubArea2.1, SubArea2.2, ..." and so on, I think it's pretty clear and straight forward (I am modelling the fact to have several areas and each of them has several sub areas).

Now, I have cell A1 being validated against the list AREA, that is, the source for A1 is "=AREA", so that I can choose one of the values in the named range AREA; I also have cell A2 being validated against the list that I choose in cell A1 using the INDIRECT function, that is, the source for A2 is "=INDIRECT(A1)".

I have already realised that this approach for cell A2 does not work, as it seems that INDIRECT does not work for dynamica named cells.

An option would be using the following for the source of A2: ....

View 9 Replies View Related

COUNTIF, INDIRECT And Dynamic Named Ranges

Nov 22, 2006

The following formula produces the desired result:

=COUNTIF(INDIRECT(TEXT(A8,"mmm")&"!B2:Z100"),"SK")
but replacing the range of cells with a dynamic named range returns #REF!:

=COUNTIF(INDIRECT(TEXT(A8,"mmm")&"!Data"),"SK")
where A8 is the date 01/01/07. I'm trying to count items within the range Jan!Data.

I'm not sure if I'm trying to do the impossible, or if I'm missing something.

View 9 Replies View Related

Dynamic Named Ranges And Indirect Data Validation INCOMPATIBLE?

Sep 25, 2009

I can use a dynamic named range and a direct reference to the name and the DV works.

I can use a standard named range (not dynamic) and an INDIRECT() reference to a cell with the name of the range in it and the DV works.

But if I try to use a dynamic named range and an indirect reference to a cell with the name of the range in it, the DV fails.

Any workarounds out there? This project includes a LOT of DV lists, getting them to self-maintain is important if I can do it.

View 12 Replies View Related

Dynamic Named Ranges Using Match / Address And Indirect Functions

Dec 17, 2012

I am having an issue when I try a chart a named range. The named range "Refers To" is

Code:
=OFFSET($A$1,(MATCH("Kevin",$A:$A,0)-1),,,COUNTA(INDIRECT(ADDRESS((MATCH("Kevin",$A:$A,0)-1),1,1,1)
&":"&ADDRESS((MATCH("Kevin",$A:$A,0)-1),100,1,1))))

As far as I can tell, the formula works just fine. If you look in the Name Manager and check on that Name, the highlighted box shows up exactly what it should and if you do a simple MAX test, it displays the correct MAX value from that range.

The problem comes in when I try and add it to a chart. Instead of a displaying all the values in the range, it displays nothing. Doesn't flag up any errors, just nothing.

The reason I chose to do it this way is that the table contents could change on a daily basis and so could the position of the row and I don't want to have to keep changing the references in the graph so make sure the right data is being displayed. Is it just that charts don't play well with the INDIRECT function?

View 4 Replies View Related

INDIRECT Function Not Working Inside MATCH With Dynamic Ranges

Mar 25, 2014

I am getting a #REF error when using an INDIRECT function within a MATCH function to check against a dynamic named range. Basically, I am trying to get the row reference so that I can go back and extract other data from the row (in a table contained in another sheet) into the current worksheet.

I attach an example file for reference. The issue arises when a Dynamic Named Range is used. In the example file, if a value from a static range is chosen, the match with indirect function works, but it fails with the dynamic range.

Dynamic Ranges INDIRECT v2.xlsb

View 3 Replies View Related

Macro Quit Working - Dynamic Named Ranges

Jun 1, 2006

I did the huge macro that names a bunch of dynamic ranges, all similar to the following: Range("=OFFSET(BD!$C$32,0,1,1,COUNT(BD!$32:$32))").Name = "ChtBDLabel"

I tested it as I went along, so I know it was working. Then I worked on several other tasks (copying the range to another location on the sheet, making graphs from the ranges). Now when I go back to run this again, I get: Run-time error '1004':
method 'Range' of object '_Global' failed. I went and looked what I thought were my named ranges, and they were wrong (not dynamic, just a cell reference). I deleted them and tried again with same error.

View 3 Replies View Related

Named Range / Use Of Indirect

Mar 6, 2009

In cell A1 I have the text Testme

Testme is a Named Range
with RefersTo set to:
=Sheet1!$D$3:$D$5

In VBA - How do I

Range("A1").copy Range("D4").PasteSpecial xlPasteValues

And D4:D6 will show
123
456
789

This thing is beating me up -- Indirect is likely involved, but,,,

View 9 Replies View Related

Indirect With Non-continuous Named Range

Oct 9, 2003

I'm trying to use Indirect in a formula where named range refers to multiple non adjacent cells; e.g. ever other cell {A1, A3, A5... etc}; however, when I use indirect, I recieve a #ref error. Replacing the indirect with the actual named range will make the formula work just fine, or using a named range that a continuous range works fine as well. It seems that indirect doesn't like non continuous ranges. ?

View 6 Replies View Related

Indirect Function To Reference A Named Range

Apr 30, 2009

How would I used the indirect function to reference a named range in the workbook in formula creation.

For instance, if in cell A1 I have entered the text "Sales" which is also a named range in the workbook. Then in cell A2 I tried entering the following formula to sum based on the entry in cell A1 using the indirect funtion. For instance:

=sum(indirect(A1))

In this instance I was hoping this formula would then sum the amounts in the "Sales" named range. And, if I changed the text in cell A1 to "Cost" for instance (another named range in the workbook), it would sum the amounts in the "Cost" named range. Allowing for a dynamic formula based on the entry in cell A1.

I'm using Excel 2007.

View 9 Replies View Related

SUMPRODUCT / SUMIF With Named Range

Mar 26, 2007

Why won't this SUMPRODUCT work?

SUMPRODUCT(Sheet2!D1:D2000=OPEN,Sheet2!F1:F2000)

I have a range (D1:D2000) that contains a 'Status' value.

OPEN is a named range that refers to eight possible Status values: Assigned, New, Hold, Re-test, In Progress, Failed, Ready for Push, Coded

The formula should sum the values in F1:F2000 for any row containing one of the eight statuses in D1:D2000.

View 9 Replies View Related

Sumproduct W/named Range Crashes XL

Feb 13, 2008

I'm still using XL2003 (Heck, they JUST upgraded from 2002 last year! So at this rate, I'll probably get 2007 here in the office by 2012).

I have a few named ranges that use Indirect & Count functions to auto-adjust the range to the last row. Something like this.

Name: ProjectID
Range: Sheet1!$A:INDIRECT("$A$"&COUNT($A:$A))

When I try to include the named range in a sumproduct statement, it crashes XL the moment I type the evaluative sign (< = >) within the 2nd bracket. Like this:

=SUMPRODUCT(--(ProjectID>2500))

(The actual formula works on several other columns of data. I'm citing a simple example, which also crashes my XL.)

Is that my installation causing the error or something wacko in XL? Please try and write back.

View 9 Replies View Related

Sumproduct With Dynamic Range

Nov 2, 2007

I have a sheet with data in A1:A50 also in B1:B50 and amounts in C1:C50
I calculate using the formula sumproduct((a1:a50="yes")*(B1:B50="RED")*(C1:C50)). How can I change this to allow for rows being added on a regular basis.

View 9 Replies View Related

Dynamic Named Range Sort Including Cells Outside Defined Range

Apr 3, 2008

Im sorting a dynamic range as mentioned in this Sorting a Named Range. My range is called drWarningTypes and is defined as:

=OFFSET(DataSource!$A$2,0,0, COUNTA(DataSource!$A:$A)-1,1)

When there is only one cell in the range, then running the following sort function includes A1 also in the search (and also adjoining columns).....

View 9 Replies View Related

RANKIF Using SUMPRODUCT With Dynamic Range

Jul 16, 2012

I have a "RANKIF" formula using SUMPRODUCT:

=SUMPRODUCT(--($B4=$B$4:$B$100),--($F4

View 9 Replies View Related

Creating Named Range Taking Avg To Date Of Dynamic Range

Jul 15, 2014

I have a column of data that keeps getting new information in it. what i need is a named range that i can use for a chart, first point in the named range will be the first value in the column, second point will be avg. of point 1 and 2, then 3rd point will be avg. of 1,2,3 etc.

View 1 Replies View Related

Named Range Not Working In Some Functions

Apr 29, 2012

I have a problem using a named range as an arg to worksheet functions.

First, I create 2 end point names for the range, myStart, myEnd.
Then I create a named range myRange = myStart:myEnd

This formula in a cell works: SUM(myRange)
This formula doesn't: COUNT(myRange) . It crashes Excel, requests Restart.
But these work: COUNT(myStart:myEnd) and SUM(myStart:myEnd)

Why does SUM work for either set of args, but COUNT only works for one set?

Here is the F3, PasteList output:

mFirstCol =mFirstColMinus1+1
mFirstColMinus1 =COLUMN(Sheet1!$A:$A)
mInsertCol =COLUMN(Sheet1!$B:$B)
mLastCol =MAX(mFirstCol, mInsertCol-1)
mNumberCols =mInsertCol-mFirstCol
mRowEnd =INDIRECT(ADDRESS(1,mLastCol))
mRowRange =mRowStart:mRowEnd
mRowStart =INDIRECT(ADDRESS(1,mFirstCol))

View 4 Replies View Related

Working With A Subset Of A Named Range

Dec 19, 2008

I have a sheet of data that is imported from an external database. Depending on which report gets imported, the column count and column location will vary. However, the headers for the columns I need to work with are constant, therefore I create a named range for all columns, and reference the ranges as I work with the data and avoid hard-coded cell references. Therefore, the ranges are one cell wide, with up to 2000+ rows.

Here's my problem. I need to reference a sub-set of a named range, to get the min of the subset. I've searched this board and others, but can't find an example of this method. The code is within a loop, and the range subset location is determined by a count on another named range.

The data involves Tasks and Subtasks. Each task can have multiple subtasks, and each subtask has it's own start and end dates. I'm trying to determine the earliest start date and the latest end date for each individual Task so I can determine the total duration for the Task.

Here's the code that determines the cell range. This code is working.

d2 = WorksheetFunction.CountIf(Range("ASR"), Range("ASR").Cells(y, 1).Value) ' count number of tasks in this ASR, store in d2

The code that I can't figure out is below. The compiler can't figure out what I'm trying to do. (Neither can I!!)

d3 = WorksheetFunction.Min("Planned_Start_Date").Cells(y, 1), Cells(y + d2 - 1, 1).Value) ' Get the min Planned Start Date for this ASR

In english: Look in the Planned_Start_Date named range, and more specifically a certain subset of that range, and return the minimum date found.

I've tried several ways, none of which will compile. I realize the above code is way off; I include it to show how lost I really am!

Slightly off-topic: I'm fairly new to VBA, and am expected to create executive dashboards with the data. I've purchased Excel 2003 Power Programming with VBA and Excel Charts (both Walkenbach); Excel Programming 2nd Edition; Excel Edition of Using Visual Basic for Applications; and Dashboard Reporting with Excel, Kyd. These are all useful books, but I think they expect me to have a better understanding than I have.

View 9 Replies View Related

Dynamic Named Range ..

Dec 30, 2008

I need to create a dynamic named range called "DIVLOC," that corresponds to a sheet called Divloc_List in the workbook. Then, I need to take this range and perform a vlookup against it. I tried to create the range in the sheet itself (it wasn't dynamic), and then used that in the vlookup in the vba code, but I got error 2402 (I think). I'm not sure how to define the dynamic range in vba code, and then use the range in the vlookup.

View 9 Replies View Related

Dynamic Named Range Somehow Changes

Jan 4, 2009

what would cause the formula for a dynamic named range to keep changing on its own? I enter the following formula:

OFFSET('Raw Data'!$D$2,0,0,COUNTA('Raw Data'!D:D),1)

Which I save and somehow gets changed to the following formula:

OFFSET('Raw Data'!$D$2,0,0,COUNTA('Raw Data'!XFD:XFD),1)

This is happening to several named ranges I created. I’ve tried to correct this by editing the formula which seems to work but changes again. I’ve also deleted the named range and recreated it with the same change process taking place.

In case it matters the named ranges are being created on a table imported into Excel via MS Query.

View 9 Replies View Related

Dynamic Named Range

Nov 6, 2009

I am trying to create a dynamic named range to select a list of text entries from a number of different columns that I am using for Data Validation. The columns have entries of variable length, none more than 30. What I am seeking to achieve is that having selected a heading in cell C3 the available list in DV dropdowns elsewhere are governed by the contents of C3.

I have created a defined name, StartPos that uses the contents of C3 to evaluate to the cell reference (e,g $H$4) of the topmost cell in the relevant column. However when I try to use it in the usual formula

=OFFSET($A$1,0,0,COUNTA($A:$A),1) formula I try

=OFFSET(StartPos,0,0,COUNTA(StartPos:[ ],1)

I get stuck at what to put in the brackets. Ideally I would like to use the COUNTA to go down to the last entry in the column. However, even when I try to give the range a height of 30 rows:
=OFFSET(StartPos,0,0,30,1) I still get an error.

View 9 Replies View Related

Sumproduct With Dynamic Range Across Multiple Workbooks

Apr 11, 2012

I have a problem with a sumproduct formula. The formula works however both workbooks have to be opened at the same time or it will not update and you get a #VALUE! error. The formula is:

=SUMPRODUCT(SUMIF([Mthlydta.xlsx]FEB!$DZ$11:$DZ$65536,Cash,[Mthlydta.xlsx]FEB!$DP$11:$DP$65536))

I have also tried using

=SUMPRODUCT(INDEX([Mthlydta.xlsx]FEB!$DZ$11:$DZ$3000,MATCH(Cash,[Mthlydta.xlsx]FEB!$DP$11:$DP$3000,0),1))

But it only finds the first value in the list Cash. Which the list of accounts for cash will grow because we are expanding and have several mergers going on.

View 1 Replies View Related

Convert Dynamic Range To Static Named Range

Sep 13, 2007

My searches have not produced anything that I could apply to this situation.

I'm trying to write VBA that would:

1. Search a Workbook for Dynamic Ranges.

2. When a Dynamic Range is found the code would:

A. Determine the current coordinates for the range.
B. Change the "Refers To" value From "=OFFSET...." To "=Worksheet_Name $Column$Row:$Column$Row"

3. Save Changes.

4. Close File.

My apologies but I have very little experience in writing VBA. I understand about variables, arguments, and IF/THEN but just enough to use functions within Excel.

View 9 Replies View Related

Dynamic Named Range With GETPIVOTDATA

Jun 18, 2013

I want to create a charts on a pivot table, but I don't like the way Pivot charts function and the limitations they have.
So I want to create a normal charts that is dynamic and based on a pivot table.

In order to do so, I want to create dynamic named ranged for the data in the pivot table to use for the data series for the chart.

I can reference the week numbers (headers in the pivot table) for one data series and get the data by this formula:

=OFFSET(Weekly!$C$15,0,0,1,COUNTA(Weekly!$14:$14)-1)
$C$15 is the first cell that holds the data for the series.
Row 14 holds the week numbers (headers in the pviot)

However, I want to make that formula even more dynamic by having it reflect the changes done to the pivot table who's cells it references to.

So how do I do this using the GETPIVOTDATA function? (or some other function that makes it dynamic and reflect changes done to the pivot table and accounts for the row numbers with the data can change)
If I generate the GETPIVOTDATA formula and try to substistute the fixed cell reference for $c$15 with it, the OFFSET formula for the dynamic range gives an error.

And how can I grab the column headers (week number) dynamically?

View 1 Replies View Related

Dynamic Named Range Changing?

Feb 25, 2014

I am doing an Advanced Filter, and I am using a named range in my VBA code that decides the Criteria range.

The dynamic named range is called 'Criteria' and this is the code:

VB:
=OFFSET(Sheet1!$A$2,0,0,Sheet1!$BZ$23,41)

However, when I run the VBA code, although it works perfectly, afterwards the named range has changed to:

VB:
=Sheet1!$A$2:$AO$3

I just want this to remain unchanged, as it works great. This is my VBA code:

VB:
'Filter and send data to new sheet
Sheets("Sheet2").Select
Cells.Select

[Code]....

View 4 Replies View Related

Offset Dynamic Named Range

Jul 23, 2014

I know how to create a dynamic named range so that no blanks appear in my data validation list but have only ever done this for a list in a column, i.e...

-----A-----
1--Apple
2--Orange
3--Pear
4--Bannana
5--
6--

A1:A6 would be named Fruit, then name manager, edit: =OFFSET($A$1,0,0,COUNT($A1:$A6),1)

The Data Validation list then shows Apple, Orange, Pear, Bannana. And if I add Peach into A5 later, that then appears in the list.

What I need though is to edit this as if the named range 'Fruit' covers cells A1:F1.

------A---------B-------C--------D-----------E-----------F
1--Apple---Orange---Pear---Bannana---
2--

View 7 Replies View Related

Dynamic Named Range With Dates?

Mar 4, 2014

create a dynamic named range with dates.

Example file. !

Dynamic-test-sheet.xlsx

I need an dynamic named range for column B(Project) with a date criteria.

so for example: I need a range with all records from Colomn B(Project) from year 2013.

I want to use this range to filter all unique projects by year.

I have already a filter/formula to collect a unique list of all projects.

View 9 Replies View Related

Dynamic Named Range But Unselect First Set?

Aug 16, 2013

I have a named range in a column for January data (non-contiguous cells). Every month I insert new data in the column to the right. Is there a way to have a dynamic range that grabs the same exact cells but in the new column but unselects the previous month data? Spreadsheet attached.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved