Use Named Range Name From Cell In Function/Formula

Apr 2, 2009

I have several named ranges with 4 column each. The named ranges have all the same names but with the tow last digits ranging from 00 to 50 by increments of 5 (ie 00, 05, 10, 15 etc.). The 4 columns for each of the named ranges have the following headings; 10, 100, 50 ,70. I have two cells with drop down lists with the list of the suffixes of the named ranges in cell e5 (ie 00, 05, 10, etc) and in g5 a drop down list with the 4 headings for the columns (10, 100, 50, 70)

I want to refer to these 2 values so that in column B, I can get the values of the column chosen for the given named range. For example, the column "100" for the named range THRESHOLD_10. In cell C1, I entered the following formula ="THRESHOLD_"& E5 which gives me the named range name. I entered the following function in the first cell of column B = index(C1,2,G5) but get a #REF! answer. If I write the following formula =index(THRESHOLD_10,2,G5) I get the right value.

how to get about it, and indirect(C1), but still gets a #REF! message. When I evaluate the formula, the named range appears with quotes "" which might be the reason that it cannot work. I am nearly there...but for the syntax and cannot get that working!

View 3 Replies


ADVERTISEMENT

Named Range Name In Cell For Use In Formula

Aug 31, 2007

I want to be able to do is to have a text value in a cell which will be the same as a named range and can be called from a formula in another cell. For example, I have three named ranges: JAN, FEB and MAR. Instead of having a formula which might read: =VLOOKUP("bill", JAN, 1, 1)

I would like to have in cell A1 the text value "JAN" so that the formula can read:
=VLOOKUP("bill", A1, 1, 1)

Then I can change which named range is used in the formula but changing the value in cell A1. When I try to do this, the formula just looks up the value as if cell A1 was the range rather than taking the value from A1 as the named range.

View 2 Replies View Related

Dynamic Named Range = Last Used Cell In Column; RC In Formula

Apr 28, 2009

Can you use Row & Column numbers in a Formula the way you can in VBA?

I want to do the same as Range(Cells(5,2)) in VBA EXCEPT in a Formula
because I want to use named ranges for the Row & column entries. (And I don't want to have to run a macro every time a change is made. The spreadsheet is huge enough already. It's slow on my machine & I have the biggets baddest PC in the company!)

Using Formulas only, (not VBA) I would like to create a Dynamic Named Range, LastUsedRow, which is the ROW NUMBER of the Last Used Cell in Column C
(it would = 470)

Also I have an existing Named Range HeaderRowNum (it = 16)

Currently I have a LOT of formulas like:
=SUMPRODUCT(($E17:$E470)*(--(CO17:CO470>0)))

problem is any new data must be added between Rows 17 & 470

So I would like to create dynamic new forumlas to read like:
SUMPRODUCT( (Cells(HeaderRowNum+1,5) : (LastUsed Row,5)) * (--(Cells(HeaderRowNum+1,93) : (LastUsed Row,93))>0) )...............

View 5 Replies View Related

Pass A Named Range From A Cell As An Argument To A Formula

Oct 20, 2009

I have the following formula which works fine in this form:

View 4 Replies View Related

Passing Cell Content As Named Range In Formula

Sep 13, 2006

how to pass a cell content into a formula as a named range? For instance, I have 3 named range (Budget, Actual, Forecast) and I use the named range in vlookup formulas. But instead of using the named range in the formula directly, I want to refer to a cell where I can type in which named range I want to use. Can this be done? I am attaching a sample spreadsheet to clarify what I mean.

View 6 Replies View Related

Dynamic Named Range :: Does Not Copy The Formula That References A Cell From Another Line

May 29, 2007

I am having a few problems with dynamic named range in excel 2000.

When adding new data to the range, excel extends the range correctly, but only copies some of the formula correctly. It does not copy the formula that references a cell from another line.

I am trying to create a excel spreadsheet and have a formula =e10-e9, which does not copy down.

View 10 Replies View Related

Determining If Cell Is Part Of Named Range And What That Named Range Is?

Aug 16, 2014

Let's say you have a named range, Rng1, which consists of cells A1 & A2. In vba how would you report back what, if any, named range the following cells resides:

Code] .....

here are multiple named ranges so using intersect is not feasible. Essentially, through code, I will be given a range and I need to determine if that range if part of a named range.

View 5 Replies View Related

Copy/Paste Cell To Named Range Named In Adjacent Cell

Sep 4, 2007

I have read post re this question but have not been able to answer my problem. I get the error message 'Application defined or object defined error' when running the code below. I should indicate the range counter currently indicated about 6,200 rows that this code will work on and the individual range names in the list of 6,200 rows are spread over at least 20 worksheets.

The code appears to be running but after some time it stops on the line of code 'Range(Cells(i, 1).Value) = Cells(i, 2)'.

Sub PopulateWithImportData()
Dim counter As Integer
counter = Sheets("Imported Data").Range("Counter")

Application. ScreenUpdating = False
Application.Calculation = xlCalculationManual
Worksheets("imported data").Select
Range("a1").Select

i = 1
Do Until i = counter
Range(Cells(i, 1).Value) = Cells(i, 2)
i = i + 1
Loop

View 8 Replies View Related

In CSE Sum() Function With If... Using A Named Range...

Oct 12, 2007

i have a bit of a problem with the sum() array function.

im trying to get the sum of an array based on 2 conditions.

my excel sheet looks as follows; i have 10 columns, which define also the names of these columns.

AccountLink - AccountLevel - Master_Sub_Account - Debit - Credit - Account_Type - Period - Project - ProjectCode - ProjectName

I want to sum for an AccountType the debit, where project is 3.

the formula i use is:
=SUM(IF(Account_Type=L24,IF(Project=M24,Debit)))
(with {} brackets of course, and CSE'd).
BUT, it is giving me a #NUM error.

why? (when i replace the column names with the actual ranges, i.e. F1:F211 for AccountType, it works)... could this be due to the fact that the named ranges are composed of the full columns or something? And, is there a way to solve it that it will work with these named ranges...?

View 9 Replies View Related

AND Function Not Recognise The Named Range

Jun 22, 2006

In the formula below the AND function cannot recognise the named range "KolomFFundering". I need the named range because when I insert a row the range must also change. Is there any way to rewrite this formula without losing it's function? The range of "KolomFFundering" is F13:F23.

=IF(AND(J12<>"";KolomFFundering<>"");"verwijder getal uit kolom 'hoeveelheid'";IF(KolomFFundering<>"";SUM(KolomFFundering);IF(P12<>"";P12/L$227;"")))

View 10 Replies View Related

Select Which Named Range To Use In A Function

Oct 7, 2008

is it possible to change the named range used in a formula based on the value selected in a dropdown. I have 4 named ranges NR1, NR2, NR3 and NR4. I would like to have a VLOOKUP that uses the named range that has been selected in a drop down. So if I change the drop down option I would get a different result as it will be looking at a different range.

It is not possible to put all of the values together as one named range as the intention is that I would select the range on a hidden and protected sheet so people would only see what they need to but I only have to manage one master sheet instead of having to create a new sheet for each range.

View 2 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

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.

View 3 Replies View Related

Passing Named Range Into User Defined Function?

Dec 4, 2012

Passing Named Range into User Defined Function

MrExcel.com | Excel Resources | Excel Seminars | Excel Products mcm91201

Depending on time of day and computer I am sitting in front of I am using:

WinXP Pro SP2 with Excel 2003
Win7 Pro SP2 Excel 2007
Win7 Pro SP2 Excel 2010 on PC
Win7 Pro SP2 Excel 2010 on Mac Mini running Boot Camp
OSX Excel for Mac 2011

I have only tried this on Win7 Pro SP2 Excel 2007 but need it to work on all.

I enter the values 0, 1, 2 ... 89, 90 in cells A1 to A91

I select A1:A91 and name the range 'angle'

I create a user defined function:

Public function sindeg(value As Double) as Double
sindeg = sin(worksheetfunction.radians(value))
end

I want 'value' for the function in a cell to be replaced by the corresponding value in the same row (or column) in the named range 'angle'. For example (using commas as column separators). This works for Excel functions like sin, cos, radians, etc.

********** Worksheet Contents **********

A1 = 00, B1 = sin(radians(0)), C1 = sin(radians(A1)), D1 = sin(radians(angle)), E1 = sindeg(0), F1 = sindeg(A1), G1 = sindeg(angle)
A2 = 01, B2 = sin(radians(1)), C2 = sin(radians(A2)), D2 = sin(radians(angle)), E2 = sindeg(1), F2 = sindeg(A2), G2 = sindeg(angle)
A3 = 02, B3 = sin(radians(2)), C3 = sin(radians(A3)), D3 = sin(radians(angle)), E3 = sindeg(2), F3 = sindeg(A3), G3 = sindeg(angle)
......
A91 = 90, B91 = sin(radians(90)), C91 = sin(radians(A91)), D91 = sin(radians(angle)), E91 = sindeg(90), F91 = sindeg(A91), G91 = sindeg(angle)

Column A = input. Columns B, C, D, E and F all calculate the same value by row. Column G fails with a #VALUE. In row 1 the value of angle[1] = 0 therefore column D = C = B = sin(0) = 0. In row 2 angle[2] = 1 therefore B = C = D = 0.017452

How can I get the user defined function sindeg(value) in column G to accept the named range variable 'angle' like the Excel function radians(value) accepted it in column D?

This functionality should work horizontally as well as vertically. For example enter 'angle' A1 to CM1 then have sindeg(angle) filled from A2 to CM2. It should also work in the case where the named range 'angle' is a single cell.

I am sure that this is a simple variable type definition problem in my user defined function: should the input variable be defined as type Range? Or something more exotic?

The brute force approach is to have the function determine the input value by passing in the named range, working out dimensions, calculating offset between the cell the function is in and top (left) of named range, then counting down (right) to pick the correct value. However I cannot see adding all that code to EVERY function. Occam's Razor says there has to be an easier way since Excel built in functions seem to do it readily.

View 8 Replies View Related

Function Is Not Valid On Dynamic Named Range Chart

Apr 20, 2007

I have seen one of your posts in which you make a graph update based on dynamic named ranges. Here is my problem, I already defined the name of my ranges as:

ChurnDiario =OFFSET(Clientes!$E$25,0,0,1, COUNTA(Clientes!$E$25:$AH$25))
Ejex =OFFSET(Clientes!$E$8,0,0,1,COUNTA(Clientes!$E$8:$AH$8))

The issue is that when I tried to enter the values and category (x) axis with:

Values: =offset(ChurnDiario,0,0)
Category (X) axis labels: = offset(Ejex,0,0)

On both, excel replies “That function is not valid”. I’ve tried, but still can’t make it work.

View 2 Replies View Related

Get The Range Address Of A Dynamically Named Range That Refers To A Formula In VBA

Aug 10, 2008

I have a named range that expands and contracts based upon the amount of data that is in some column. Call it AllData_UsedRange.

I have another named range that actually refers to a range. Call it AllData.

Column A
Row2 56
Row3 44
Row4 65

AllData is a named range that refers to the range A2:A65536
AllData_UsedRange refers to A2:A4 by way of this formula.
=OFFSET(AllData,0,0,COUNTA(AllData))

How to I obtain an address of AllData_UsedRange in VBA code?

These do not work...
ThisWorkbook.Names("AllData_UsedRange").RefersToRange.Address
Evaluate(ThisWorkbook.Names("AllData_UsedRange"))

View 9 Replies View Related

Stop Graph From Changing Named Range To Formula Range

Sep 8, 2006

I am trying to create a graph for a range of data that updates monthly (adding an extra month each time). I wanted the graph source data to update automatically each time the data is refreshed so used an OFFSET formula to identify a named range. I then point the graph to the named range as the source data.

When I enter the range as the source data the graph picks it up. However, when I re-enter the source data option on the graph it has converted the named range into a cell written range (ie. replaces "=QUALITY" with "='Front page'!$B$7:$J$10" - which therefore will not update when the range increases.

View 4 Replies View Related

Use Named Range In Formula

Aug 23, 2007

I have several workshts in a file with a summary worksht. I have named ranges of data on each by salesperson. How can I use a formula to get the named range from each tab to show up on the summary sheet. I tried (=Smith!AugustSales), which is the - sheet name Smith and the named range AugustSales, but I get an error.

View 9 Replies View Related

Named Range Formula

Dec 30, 2007

Lets say that B2:B100 contains a list of numbers, and it is named RANGE1

Is it possible to make by using any formula -another named range (RANGE2) based on the first but contains every 2nd or third cell of the original range.

The solution must avoid creating another column - it has to be one formula that can be used as new named range in any application (chart series...etc.)

View 9 Replies View Related

Use Named Range From Another Workbook In Formula

Aug 19, 2006

I have two spreadsheets. The sourse spreadsheet already has many named ranges which i would like to use for the main spreadsheet to pick up its information. Is there an easy way when using vlookup or the like to name the range in the other spreadsheet?

View 5 Replies View Related

Refer To A Named Range In A CSE Array Formula?

Jan 11, 2010

I know I've asked before but I can neither find my previous question or the answer.
So, once again.... is it possible to refer to a named range in a CSE array formula?
I know how I would type a formula that way -- but I would be happy to see an example.

Most importantly, will it always work? Or are there pitfalls and dangers?

View 3 Replies View Related

Insert And Show Formula With Named Range?

Jun 3, 2014

Trying to get this short piece of code to work. I'm trying to show the formula in the cell not just return the result.

[Code] ......

Why this isn't working ?

View 5 Replies View Related

OFFSET Non-Contiguous Named Range In Formula

Jul 14, 2012

I have as the two logical operators for an IF function the following COUNTA calculation which checks how many blanks are in the range GrdMtx7 and subtracts this from the value in E5 and adds the suffix "Module(s)".

Code:

(E5-COUNTA(GrdMtx7)-1)&" Module(s)",(E5-COUNTA(GrdMtx7)&" Module(s)")))
GrdMtx7 is a non-contiguous range consisting of the following cell references on a second sheet:

Code:

='Mod Schedule'!$E$7,'Mod Schedule'!$H$7,'Mod Schedule'!$K$7,'Mod Schedule'!$N$7,'Mod Schedule'!$Q$7,'Mod Schedule'!$T$7,'Mod Schedule'!$W$7,'Mod Schedule'!$Z$7,'Mod Schedule'!$AC$7,'Mod Schedule'!$AC$7,'Mod Schedule'!$AF$7,'Mod Schedule'!$AI$7,'Mod Schedule'!$AL$7,'Mod Schedule'!$AO$7,'Mod Schedule'!$AR$7,'Mod Schedule'!$AU$7,'Mod Schedule'!$AX$7
I need for the formula of the IF function to copy down so that it refers to F5, G5, H5, I5...etc.

I also need for the non-contiguous named range GrdMtx7 to refer to the same non-contiguous range shifted down one row intact for the COUNTA function to operate on the next row down, such that COUNTA is checking for blanks in the range:

Code:

='Mod Schedule'!$E$8,'Mod Schedule'!$H$8,'Mod Schedule'!$K$8,'Mod Schedule'!$N$8,'Mod Schedule'!$Q$8,'Mod Schedule'!$T$8,'Mod Schedule'!$W$8,'Mod Schedule'!$Z$8,'Mod Schedule'!$AC$8,'Mod Schedule'!$AC$8,'Mod Schedule'!$AF$8,'Mod Schedule'!$AI$8,'Mod Schedule'!$AL$8,'Mod Schedule'!$AO$8,'Mod Schedule'!$AR$8,'Mod Schedule'!$AU$8,'Mod Schedule'!$AX$8

I can't get got to work at all using OFFSET and would rather not create dozens or hundreds of named ranges incrementing one at a time - is there a way to achieve this, preferably with a formula, but vba if absolutely necessary.

My best effort doesn't work:

Code:

(E6-COUNTA(OFFSET(GrdMtx7,1,))-1)&" Module(s)",(E6-COUNTA(OFFSET(GrdMtx7,1,)))&" Module(s)")

View 2 Replies View Related

Named Formula To Return The Nth Largest Value From Range

May 19, 2009

I have a named range which refers to: =MATCH(LARGE($G$5:$G$68,ROW(G5)-4),G$5:G$68,0)+4. It is supposed to find the largest figure in the adjacent column, list its row in cell H5, then the second largest for cell H6 and so on until the end of the data. The data in column G is dynamic and some cells will contain "0" with certain sections of data thus why I need a formula and cannot just use sort each time.

My problem is that when I use the formula as a named range I get "#N/A" and when I evaluate the formula I will get the answer but in array brackets (e.g.{17}) before the final step turns it to "#N/A". The formula will work fine if inputted directly into the cell but as the same formula will be used over three columns and numerous rows I would much prefer to use a named range.

View 8 Replies View Related

Find Matched Value In A Range For Named Cell Then Copy Range Cells Below

Aug 6, 2013

I need method, using a button, that looks at a cell--say EO2, for example--, looks back on a master worksheet at a specified row and range for a match, then looks at the information from a specified range below the matching cell (The information in this column will either be blank or have an "X" in the cell), and then those rows that do not have an "X" will be hidden in the corresponding rows in the working worksheet. Therefore, if at any time the value in "EO2" ever changes, then it will automatically find a new match and repopulate and hide information as before. About 130 columns will have its own button so that a "query" can be made that depends on the information in a particular cell in that column.

The master worksheet now has matrix of 287 rows and 58 columns. Each row is for an operating procedure and each column shows a job code. An "X" in a coordinate cell for a column/row shows whether that job code is responsible for knowing that operating procedure. So, on the working sheet, an employee's primary job code is given underneath his or her name. When the button is pushed, all the operating procedures not required for a given person will be hidden and only the required ones will remain visible--grouped, if you will. Qualification dates will be easier to see now that the information is consolidated. Whenever someone transfers to a new position, a new code will be inputed on the working sheet. When the button is pushed, a new grouping will result. Any operating instructions that overlap will still have qualification dates, so that information will not need to be transcribed.

View 9 Replies View Related

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.

View 6 Replies View Related

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.

View 2 Replies View Related

Match Named Range To Range/Cell Address

Aug 25, 2006

I know that I can return the value of a defined name range, the address, and even the value of the define name, but if you are given a range address, how do you find its corresponding defined name in code?

View 4 Replies View Related

Selecting Named Range From Dropdown Validation List To Use In Formula?

Jan 18, 2013

Basically on a summary page, on sheet 1 say I have a formula which picks up the unit cost (I have this as an array across 5 years)

What I then want to do is multiply this by a volume driver. I have a list of these drivers on a seperate page, so for convenience lets say DRIVER_01,DRIVER_02 etc. These are also 5 years arrays.

So what I want to do it be able to select which driver I want to use for volume on the summary, from a drop down box I have set up, and then the formula pick up that named range, and not just recognise it as a text cell.

I need the ability to change the driver in the future, hence the drop down box. I can also get the unit array part to work fine, I'm just struggling to get this driver array to work..............

View 2 Replies View Related

Dynamic Range Used Named Cell Range

Jul 7, 2014

Line of code that will Select a Named Range in this case I have Named a CELL "DataSummary" Need to use that named range by selecting 30 columns and 54 rows.

Range("DataSummary),(??,??) doesn't work.

View 1 Replies View Related







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