# Sumif With Named Reference

Sep 15, 2006

See attached for an example. I'm trying to use the SumIF funtion with a named reference as the criteria. Here is my formula. =SUMIF(B10:F10,"<MinReq",B10:F10) It keeps returning 0 even though there is valid data.

## SumIF Using Named Ranges

Jun 16, 2014

I want a sumIF function (based on three criteria) to fill the values of cells in a column so long as there are values in the cells in the column before that one. I was working with trying a loop, but have been shown a faster way is using the With function.

There are four named ranges that all exist on a separate sheet in the file: Crude, Location, Year and Volume. Based on the first three columns of the file I wish to have an output for the sum of volume based on crude, location and year.

Right now, my output simply returns the total sum of the "volume" range in each cell in the output column.

For example, if total sum of values in the volume column is 100 then my output column currently looks like:

100
100
100
100
etc...

Here is my code including the named ranges:

[Code] ......

## 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.

## Insert Total Formula Using SUMIF And Named Range

Jul 21, 2006

I am trying to put a SUMIF formula at the bottom of the data. Doing it manually is fine, but I want some vba to automate it, and my vba doesnt work.

Sub balance()
'adds journal line so journal balances in each month

Dim Rga As Range
Dim Rgb As Range
Dim Rgc As Range
Dim Rgd As Range
Dim Rge As Range
Dim Rgf As Range

This code just inserts text into the formula, rather than the range of cells.

## Reference Last Row In Sumif VBA

Mar 20, 2009

I recorded this sumif in VBA, but know I am trying to figure out how to tie in the last row reference in place of the 27.

=SUMIF(\$AR\$2:\$AR\$27,\$AR29,AS\$2:AS\$27)
FormulaR1C1 = "=SUMIF(R2C44:R27C44,RC44,R2C:R27C)"

## SumIf Reference To Date

Jan 18, 2010

How can I reflect the correct trainee count for Day1-Batch1?

Currently columns F,G,H computes for expected, actual and total variances of trainee respectively reference to the training date J3.

Since this is a 2-day per batch even, I could not capture the 1st day trainee total of every batch because I divide the sum by 2 (2 day / training batch). The sum is only corrected on the 2nd day.
Attached herein is the sample file.

## Using Sumif And Indirect To Reference Another Worksheet

Oct 15, 2013

I am trying to use the sumif and indirect function together but I keep getting an error and I'm not sure why.

Actual formula:
=SUMIF('SWG OR'!B:B,A168,'SWG OR'!E:E)

Using the sumif/indirect function, I have the following:
> Cell B5 contains the name of the tab "SWG OR"
=sumif(indirect(B5&"!B:B",A168,B5&"!E:E"))

## SUMIF Formula With Reference To A Cell

Jun 29, 2006

I attached a file I made conditional formatting on cells C4..G6 which makes any number less than value in cell C15 invisible. In line " Total" I used SUMIF formulas which ignore any value less than 30. However the formulas should not contain static numbers but rather a reference to cell C15. But I simply cannot make it work.

## Sumif - Reference To Cell On Another Worksheet

Feb 27, 2007

I'm trying to reference a cell on another worksheet in my criteria and the formula doesn't seem to be working. All I get is a value of 0.

= SUMIF(G3:G76, ">='City Wide'!B6",I3:I76)

If I replace 'City Wide'!B6 with an actual number the formula works. This does not help as 'City Wide'!B6 is a value that can change.

## Dynamic SumIF Formulas That Reference Changing Codes

Dec 1, 2007

I have a list of codes from which I'm trying to extract all unique entries.

For example, col A has 001, 001, 002, 003, 003, 003, 004, ...

I'm trying to create a report template with formulas that reference col A and return a single unique entry for each code so that the new column has only 001, 002, 003, 004.

Essentially, the codes reference customers. A customer can have multiple purchases -- but I'm trying to create a report in which I can utilize SumIf formulas to Sum the purchases for each customer and represent those purchases on a single line per customer code.

The catch is that the purchases change monthly (i.e., next month the purchases may be 001, 002, 002, 002, 004) so my report template needs to have the flexibility to adapt without me rewriting the SumIf formulas and return SumIf results for only customers 001, 002, 004. Whereas in the prior month, the report returned SumIf results for customers 001, 002, 003, 004.

## Using INDEX With Named Range Reference

Nov 14, 2008

I'm trying to use the INDEX function to return a value from a named range. But I'm not directly typing the named range into the INDEX argument. Instead, I'm grabbing the named range from a vlookup table (essentially, another named range). So, if "vh" is the name of the named range, I'm not using the formula:

## Using Named Ranges Following Indirect Reference?

Feb 7, 2012

I have the following formula which i'm using to indirectly reference a worksheet. The worksheet i'm referencing includes named ranges that i'd like to call on but i can't get the syntax right.

Code:
=SUMPRODUCT(--(INDIRECT("'"&HH_Elec_Title&"'!B15:B19")>=D5),--(INDIRECT("'"&HH_Elec_Title&"'!B15:B19")

## Named Ranges Reference Change?

Nov 27, 2012

Change "refer to" in Named Range. I have a named range myrange referring to A1:A5. I have a condition for B1, if B1= annual then myrange should refer to C1:C5 and not A1:A5..

## Countif Criteria With Named Reference

Sep 28, 2006

I'm trying to use a countif formula with a named reference but the formula is not calculated correctly. My example would be: countif(A1:A5,<max) with max being the named reference. I also tried various options using quotes around the named reference (ex. "<max") but that doesn't work either

## Embed Named Range Into Table Reference

Sep 15, 2014

I have a named range called ReportMonth and I want to embed it into this Table reference to make the number of columns that are summed dynamic:

=SUM(tblFcastTemplate[@[Column1]:[Column28]])

I tried ="SUM(tblFcastTemplate[@[Column"&(ReportMonth+1)&"]:[Column28]])"

## Creating Column Reference From Named Range?

Apr 22, 2014

I am attempting to obtain the last non-empty row in a column of a spreadsheet by using the following formula

=SUMPRODUCT(MAX((A:A<>"")*(ROW(A:A))))

This works fine.

However, I'd like to make it more dynamic and be able to obtain a usable column reference (i.e., the A:A portion of the formula) from a named range (single cell).

## Named Formulas To Reference Relative Rows?

Jun 17, 2009

Formula: B2+C2

In columnD I want to reference the "formula" and have it calculate based on the values in whatever row references the formula.

As it stands I can only get the formula to calculate within the same row.

## Passing A Value In A Cell To A Named Range Reference

Apr 8, 2008

I have a formula which is using named ranges-

=SUMPRODUCT(xxx-30,Ship_30)/SUM(Ship_30)

where Ship_30 name references the following-
='sheet 1'!\$C\$20:\$C\$38

The value of 20 is static, the value of 38 is dynamic. Each new time period adds another value (i.e. 39,40,41)

Having to edit each name range reference in the name manager is not acceptable since there is potentially over 30 to edit each month.

I would like to edit a cell which would have contained the value 38 (or C38) with a new value of 39 (or C39) so the range reference would be updated with the new value.

The goal would be to have a couple of rows with the following that could be edited with new values

## Convert Named Range To Cell Reference?

Sep 18, 2012

I'm working with a very complex financial workbook with over 3,000 named ranges and would like code to replace the named ranges with the cell references and display it in a message box so the user can easily trace the references without removing the named ranges from the formula. There is a lot of code with the named ranges, so actually converting them to cell references is out of the question.

I found this code, but obviously it physically replaces the range names in the cell. Hopefully it can be converted to display it in a text box.

Code:
Sub FixReferencesToCellNames()
Dim c As Range, n As Name
For Each c In Range("A1:IV65536").SpecialCells(xlCellTypeFormulas)

[Code]....

What I am looking for is that a user select a cell that they want to see the references, run the code to see the cell references for that particular cell in a message box.

## 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.

## Access/Reference Named Range In Another Workbook

Oct 5, 2006

I have two workbooks wkA and wkB. I have a named range in wkB called BName.. can someone tell me whether it is possible to set a range variable (say, raA) from wkA to this named range in wkB. I have tried something to the effect of set raA = wkB.range("BName") but this doesn't work.. I've also tried set raA = [wkB.name].range("BName") to no avail. I'm wondering whether named ranges can actually be read from other workbooks.

## Reference Last Cell In Dynamic Named Range

Nov 14, 2006

In the attached spreadsheet I am trying to always reference the sum column from Qty in Det Est.

This is because the number of roads changes for each project.

I created a dynamic range name surfacing with the following formula:
=offset(qty!\$a\$1,0,0,counta(qty!\$A\$A), counta(qty!\$1\$1)).

My question is what formula do I use to reference the sum column for each row on the Det Est Sheet.

## Change Pivot Item With Named Reference

Nov 22, 2006

I'm trying to create code where a user can input criteria into a cell then run a macro. The macro would then use that criteria to filter the pivot table. I have attached an example. The first portion, using date to filter the current page - pivot item is working. I need to creating the code to use the "supplier" to filter the pivot items on the row. As a note, both the Date and Supplier cells are named references.

## Reference Non-Contiguous Named Range In Function

Feb 14, 2008

I have a split named range covering non-contiguous areas, ie:
Name: status_web
Range: =\$F\$14:\$I\$122,\$F\$700:\$I\$746,\$F\$798:\$I\$830,\$F\$905:\$I\$933

This appears to work fine when selecting the name however it returns a #VALUE! error when using it in a formula, eg: = COUNTIF(status_web, "*p*"). Is there any way to get this to work, or do I need a separate named range for each contiguous section? NOTE: Not sure whether this extra fact would through a spanner in the works, but I am referencing this named range from a separate workbook.

## Data Validation - Cell Reference To Named Range

Nov 7, 2012

If I have two cells and a named range mexico

A1, A2.

A1 contains the string: "mexico"
A2 is the cells that has required data validation (drop down list).

I want A2's validation reference to be dynamic, in the sense that I can it reference it to A1; converting the string "mexico" to a named range mexico

I tried inputting = INDIRECT(A1) into A2

But I lack clarity in my understanding of referencing.

What is the correct procedure here.

## Copy Data Over Based On Reference And Named Range?

Jul 22, 2014

I got a very technical sheet which needs your experience to work.

open the attached file below to see the workbook.

It has 3 different sheets. "RESULT", "INPUT" and "SWITCH"

On "RESULT" Cell (O11) is where the person would put a Reference.

This reference is then checked on the "INPUT" sheet column A.

From the first cell it appears in Column A, until the last cell it appears in Column A should be the Row Range (Blanks included).

But I want that range (Column A to G) to be copied to "Switch" sheet. Pasted in Cell A1 downwards.

In the "SWITCH" sheet I have already given all the GREEN Cell formated areas a name - INFO.

I want all the data in INFO to be inserted into "RESULT" sheet between row 18 and 19.

I have colour coded most of the areas for you.. And added a button from which the Macro / VBA should run when clicked.

## Reference Named Range By Position Macro Code

Mar 11, 2008

This seems really basic, but I can't seem to find it...

Using Visual Basic, if I have a named range, lets say like "NAMEDRANGE", how can I refer to cells in that range by their position in the range? For example, if I want to refer to the cell in the 2nd row and 3rd column of the range.

Also is their an easy way to refer to the first(top-left) cell in a named range?

## Circular Reference With Dynamic Named Range Used In Formula

Aug 13, 2008

I have a problem creating a circular reference with dynamic ranges. I have searched already but can't find the specifc problem. I have a spreadsheet where I use vba code to insert extra columns. Within the worksheet there are sum calculations at the end of each row. When I add a new column within the table I would like the sum calculation to expand to account for this extra column.

Now, I thought that dynamic ranges would be the way to go but the only way I can see to do it creates a circular reference as the CountA function trys to count the cell with the sum function in it.

## Using Cell Reference As List Title When Transposing Named Range

Jun 21, 2014

I am building an interactive sheet to profile a number of divisions based on a summary sheet of about 1200 rows and 90 columns of profiling criteria

I have attached an example but essentially:

1. I would like to be able to select from a list a value which would also be a named range title
2. Have the range information transposed into a row

What works:
1. I can transpose the range information when I use the following formula
I used OFFSET(Governance,COLUMN()-MIN(COLUMN(HGovernance)),0)

The problem:
I cant get it to use a cell reference (i.e. When I select Governance out of a Drop down list of Finance, HR, Governance etc). Having to type in "Governance" to bring back governance range information is fine, but not great when I am trying to profile the Finance or HR division as it then becomes too manual.

## Refer Folder/Filename In VBA Code Through Named Cell Reference

Oct 31, 2008

I have the following codes in which I am to refer a file and folder to do some further processes.

myfilename = "C:Documents and settingsacsMy DocumentsEntrymyfile1.xls"
folderPath = "C:Documents and settingsacsMy DocumentsEntry"

I want to enter these two paths in a sheet in my excel report file (For example, I am running the report from Report1.xls, in which there is a sheet name "Filepaths". In this,

in B5, I would like to enter the Filepath (B5 named as "FILEPATH")
in B6, I would like to enter the Folderpath (B6 named as "FOLDERPATH")

So that, if I am copying the folder to another area, I no need to change the code every time in the VBA editor. I can do changes in these cells and it will be taken as the path to run the code further.