Formula for Named Range in Excel - Dynamic Range

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,501
Office Version
  1. 2016
Platform
  1. Windows
Hello Friends,

If possible, what formula should I use to give the below list a dynamic range
In this case I want the name manger to look at cells (B2:B8) but ignore where the adjacent cell contains word *Total*

If I simply use offset then it picks the entire range B2:B8
Excel Formula:
=OFFSET(Sheet1!$A$2:$A$8,0,1)
But I want name list to ignore cells B5 & B8

Pls note that the word *Total* can come in any of the cells in the entire range (A2:A8) as its a result of formula


Book2
AB
1Description
2Apples
3Apples
4Apples
5Total Apples
6Bananas
7Bananas
8Total Bananas
Sheet1
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
=IFERROR(INDEX($B$2:$B$8,IF(NOT(ISNUMBER(SEARCH("Total",$A$2:$A$8,1))),ROW($A$2:$A$8),"")),"")
 
Upvote 0
=IFERROR(INDEX($B$2:$B$8,IF(NOT(ISNUMBER(SEARCH("Total",$A$2:$A$8,1))),ROW($A$2:$A$8),"")),"")

Thanks for the reply
I will try your solution tomorrow as I do not have access to my laptop right now
Will surely give feedback

Regards,
Humayun
 
Upvote 0
hrayani 20210729.xlsx
ABCD
1
2ApplesJohnblue
3ApplesblueHarry
4ApplesHarryJames
5Total ApplesJames
6Bananasjoesmalls
7Bananassmallskilling me
8Total Bananaskilling me
9
Sheet1
Cell Formulas
RangeFormula
D2:D8D2=IFERROR(INDEX($B$2:$B$8,IF(NOT(ISNUMBER(SEARCH("Total",$A$2:$A$8,1))),ROW($A$2:$A$8),"")),"")
Dynamic array formulas.
 
Upvote 0
Thanks for the reply.... but I did not get it... Do I have to put this formula in the name manager... If yes then nothing happens

Let me explain again
See the data below... I have created the named range =Sheet1!$B$2:$B$4,Sheet1!$B$6:$B$7
I want this range to be changed automatically when Total is found in any of the cells in Range A2:A8

Like when total is found in cell A2 only then I would want the name ranged to be linked to cells B3:B8

Book1
AB
1Fruits NamesDynamic List
2Apples
3Apples
4Apples
5Total Apples
6Bananas
7Bananas
8Total Bananas
Sheet1
 
Upvote 0
sorry, I misread and thought you were looking to only return the VALUES that were not "Total" which my formula does. I'm not sure there is a way to do what you want since the starting and ending points of each range will be dynamic.
 
Upvote 0
sorry, I misread and thought you were looking to only return the VALUES that were not "Total" which my formula does. I'm not sure there is a way to do what you want since the starting and ending points of each range will be dynamic.
No issues.....

Perhaps some other friend might give it a go... if possible

Regards,
 
Upvote 0
As with many of your threads, you have only asked part of the question so providing anything resembling a solution is going to be close to impossible without a lot of guesswork and time wasting.

Whilst it may be possible to create a named range in the way that you want to, the real question is what is that named range going to be used for once it has been created?

It will be difficult to do with your version of excel, with office 365 you could do it with the FILTER function, however, if you try to use that range in a formula afterwards, there are many that it will not work with.
 
Upvote 0
As with many of your threads, you have only asked part of the question so providing anything resembling a solution is going to be close to impossible without a lot of guesswork and time wasting.

Whilst it may be possible to create a named range in the way that you want to, the real question is what is that named range going to be used for once it has been created?

It will be difficult to do with your version of excel, with office 365 you could do it with the FILTER function, however, if you try to use that range in a formula afterwards, there are many that it will not work with.

This named range one created will never be used in any formula.
I will then copy a date from a cell within the sheet & paste in the named range via VBA
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top