#### create array of values returned by named formulas

```Hi all,

Is it possible to used named formulas to build an array of values that
are not constants.  I know you can use the myArray = {0,1,2,3}  to
build an array of constants but can you simulate this effect with
named formulas, e.g. myArray =  {myval1, myval2, mval3}  where the
values are derived by named formulas, eg myval1 = average(some range).
I've tried using various syntax and the named range is 'accepted'
when entered into the define box but when i come to try and use the
name as a chart reference i get an error.

Thanks
Rob
```
 0
robsjhick (7)
9/23/2003 10:42:37 AM
excel.charting 18370 articles. 0 followers.

3 Replies
367 Views

Similar Articles

[PageSpeed] 44

```OK Tushar,  here's the dilemma:

I have a table containing the percentage of my inventory with
specified age ranges:

Month     0 day    1 day     2 day    etc...
July 03    2%        15%       25%
Sept 03    5%        10%       25%
etc....

I want to plot this as a cumulative percentage (an S curve) which will
show the percentage of units with at least some days to expiry.  To do
this, i want to create an average of a selected period for each age
range and then add the values succesively to create a cumulative
percentage.  The final results may look like this:

Max age      Cum Perc
0              2%
1              17%
2              42%
etc...

I have managed to create the averages of a selected range but i can't
create the series as shown above unless i do it on the spreadsheet.  I
though it might be something like:

srsCumPerc = Avg0, Avg0 + Avg1, Avg0 + Avg1 + Avg2  etc..

but this won't 'build' an array.

Rob

Tushar Mehta <tm_200310@tushar-mehta.com> wrote in message news:<MPG.19dd0377476004898968c@news-server>...
> What you want to do is possible within the quirky rules that guide
> named formulas.  I suspect a general purpose answer does not exist, but
> business/application, someone should be able to provide further
> guidance.
>
> --
> Regards,
>
> Tushar Mehta, MS MVP -- Excel
> www.tushar-mehta.com
> Excel, PowerPoint, and VBA add-ins, tutorials
> Custom MS Office productivity solutions
>
> robsjhick@hotmail.com says...
> > Hi all,
> >
> > Is it possible to used named formulas to build an array of values that
> > are not constants.  I know you can use the myArray = {0,1,2,3}  to
> > build an array of constants but can you simulate this effect with
> > named formulas, e.g. myArray =  {myval1, myval2, mval3}  where the
> > values are derived by named formulas, eg myval1 = average(some range).
> >  I've tried using various syntax and the named range is 'accepted'
> > when entered into the define box but when i come to try and use the
> > name as a chart reference i get an error.
> >
> > Thanks
> > Rob
> >
```
 0
robsjhick (7)
9/26/2003 10:09:52 AM
```Use something like:

Option Explicit
Sub Macro1()
Dim aStr As String, anArr(1 To 10) As String, i As Long
'The first loop below simply adds some test data
For i = 1 To 10
anArr(i) = i
Next i
'The next loop replaces the data in the array _
with the running average for entries 1..i
For i = 2 To 10
anArr(i) = CStr((CDbl(anArr(i - 1)) * (i - 1) _
+ CDbl(anArr(i))) / i)
Next i
aStr = Join(anArr, ",")
"={" & aStr & "}"
ActiveChart.ChartType = xlColumnClustered
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Values = "=Book3!SomeArr"
End Sub

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

robsjhick@hotmail.com says...
> OK Tushar,  here's the dilemma:
>
> I have a table containing the percentage of my inventory with
> specified age ranges:
>
> Month     0 day    1 day     2 day    etc...
> July 03    2%        15%       25%
> Sept 03    5%        10%       25%
> etc....
>
> I want to plot this as a cumulative percentage (an S curve) which will
> show the percentage of units with at least some days to expiry.  To do
> this, i want to create an average of a selected period for each age
> range and then add the values succesively to create a cumulative
> percentage.  The final results may look like this:
>
> Max age      Cum Perc
> 0              2%
> 1              17%
> 2              42%
> etc...
>
> I have managed to create the averages of a selected range but i can't
> create the series as shown above unless i do it on the spreadsheet.  I
> though it might be something like:
>
> srsCumPerc = Avg0, Avg0 + Avg1, Avg0 + Avg1 + Avg2  etc..
>
> but this won't 'build' an array.
>
>
> Rob
>
> Tushar Mehta <tm_200310@tushar-mehta.com> wrote in message news:<MPG.19dd0377476004898968c@news-server>...
> > What you want to do is possible within the quirky rules that guide
> > named formulas.  I suspect a general purpose answer does not exist, but
> > business/application, someone should be able to provide further
> > guidance.
> >
> > --
> > Regards,
> >
> > Tushar Mehta, MS MVP -- Excel
> > www.tushar-mehta.com
> > Excel, PowerPoint, and VBA add-ins, tutorials
> > Custom MS Office productivity solutions
> >
> > robsjhick@hotmail.com says...
> > > Hi all,
> > >
> > > Is it possible to used named formulas to build an array of values that
> > > are not constants.  I know you can use the myArray = {0,1,2,3}  to
> > > build an array of constants but can you simulate this effect with
> > > named formulas, e.g. myArray =  {myval1, myval2, mval3}  where the
> > > values are derived by named formulas, eg myval1 = average(some range).
> > >  I've tried using various syntax and the named range is 'accepted'
> > > when entered into the define box but when i come to try and use the
> > > name as a chart reference i get an error.
> > >
> > > Thanks
> > > Rob
> > >
>
```
 0
tm_200310 (19)
9/26/2003 8:44:03 PM
```Rob -

Tushar's example can help in your case.  A clue you gave us is that the
array is accepted in the define names dialog, but doesn't work in the
chart.  The chart split from the worksheet's evolutionary tree several
generations ago, and has lost the DNA sequence that recognizes complex
defined names that the worksheet thrives on.  In most cases now, I just
put the data in a sheet somewhere, without trying to construct a fragile
defined relationship.  I may then define a name that refers to this data.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Rob Hick wrote:
> OK Tushar,  here's the dilemma:
>
> I have a table containing the percentage of my inventory with
> specified age ranges:
>
> Month     0 day    1 day     2 day    etc...
> July 03    2%        15%       25%
> Sept 03    5%        10%       25%
> etc....
>
> I want to plot this as a cumulative percentage (an S curve) which will
> show the percentage of units with at least some days to expiry.  To do
> this, i want to create an average of a selected period for each age
> range and then add the values succesively to create a cumulative
> percentage.  The final results may look like this:
>
> Max age      Cum Perc
> 0              2%
> 1              17%
> 2              42%
> etc...
>
> I have managed to create the averages of a selected range but i can't
> create the series as shown above unless i do it on the spreadsheet.  I
> though it might be something like:
>
> srsCumPerc = Avg0, Avg0 + Avg1, Avg0 + Avg1 + Avg2  etc..
>
> but this won't 'build' an array.
>
>
> Rob
>
> Tushar Mehta <tm_200310@tushar-mehta.com> wrote in message news:<MPG.19dd0377476004898968c@news-server>...
>
>>What you want to do is possible within the quirky rules that guide
>>named formulas.  I suspect a general purpose answer does not exist, but
>>business/application, someone should be able to provide further
>>guidance.
>>
>>--
>>Regards,
>>
>>Tushar Mehta, MS MVP -- Excel
>>www.tushar-mehta.com
>>Excel, PowerPoint, and VBA add-ins, tutorials
>>Custom MS Office productivity solutions
>>
>>robsjhick@hotmail.com says...
>>
>>>Hi all,
>>>
>>>Is it possible to used named formulas to build an array of values that
>>>are not constants.  I know you can use the myArray = {0,1,2,3}  to
>>>build an array of constants but can you simulate this effect with
>>>named formulas, e.g. myArray =  {myval1, myval2, mval3}  where the
>>>values are derived by named formulas, eg myval1 = average(some range).
>>> I've tried using various syntax and the named range is 'accepted'
>>>when entered into the define box but when i come to try and use the
>>>name as a chart reference i get an error.
>>>
>>>Thanks
>>>Rob
>>>
>>

```
 0
9/27/2003 3:53:23 AM

Similar Artilces:

Encode URL parameter value?
Hi, I need to pass parameter to a URL (on the internet). Are there any function to encode parameter like Server.URLEncode() in ASP? Thank you, Kelvin Are you talking about InternetCanonicalizeUrl()? "Kelvin" <Kelvin_gl@yahoo.com.cn> wrote in message news:ehdMDOFVEHA.2844@TK2MSFTNGP12.phx.gbl... > Hi, > > I need to pass parameter to a URL (on the internet). Are there any function > to encode parameter like Server.URLEncode() in ASP? > > Thank you, > Kelvin > > Oh yes, it is exactly what I had spent a lot to time looking for... Thank you a lot....

create a roster
How can you create a weekly roster in which functions can be assigned to more than 10 people. The roster should be updatable, so that when holidays and days off are marked on the weekly roster they will be taken account of it future rosters. ...

Drive array configuration
Ok, I am a new IT manager at my company, and the old IT manager (who moved into a different position in the company) is still well-respected. I emailed that I want to take an 14 disk drive array of 18G drives that is not being used and add it to our second Exchange 2003 server to be used as storage space for Exchange. Our current primary Exchange server is one of our domain controllers (something the old IT manager setup). I have not gotten too far with the configuration yet, so he "offered" his advice and said that setting up the array in a RAID-5 configuration is bad. With that...

Is there a formula to show \$5,000,000 as \$5M?
I am looking for an easy way to convert \$M values to eliminate the 6 zeros. Thanks. You could try something like this: =IF(RIGHT(A1,6)="000000",A1/1000000&"M",A1) unless someone has a better idea.... Sheila "ExcelHelp" wrote: > I am looking for an easy way to convert \$M values to eliminate the 6 zeros. > > Thanks. Another option: =TEXT(A1,"\$ #,, ""M""") Another option would be to keep the value in the cell, and use a similar Custom format. -- Dana DeLouis Win XP & Office 2003 "ExcelHelp" <...

how to define scroll bar's page size value?
Hi all, I have a confusion about calculating scroll bar's page size. In my application, I am drawing an image according to scroll bar position. m_iGeneratedImgWidth - Width size of the image (this value is always bigger) rect.right - Width of the drawing area. how to define scroll bar's page size value? SCROLLINFO info; info.cbSize = sizeof(SCROLLINFO); info.fMask = SIF_RANGE|SIF_PAGE|SIF_POS; info.nPos = 0; info.nMin = 0; info.nMax = m_iGeneratedImgWidth - rect.right; info.nPage = ? In my OnHScrollBar() function, for SB_PAGELEFT / SB_PAG...

importing or creating reference footnotes
I am trying to import a word document into publisher and it has reference footnotes within the document. The reference footnotes are not coming into the publisher document with the reference footnotes. Correct, they will not up to Publisher 2003. In Publisher 2003 depending on which version of Word you are using if they will or not. -- "If you don't know where you are going, any road will take you there!" ...

Reference to cell with text is returning #VALUE
I have a cell that references a different cell that that consists of H9:J9 that is formated for and contains text. The referenceing cell shows #VALUE instead of the actual text that is in the cell? Any ideas as to why this is happening? Any help would be appreciated. What does your formula look like? A simple link formula can only reference a single cell. Like this: =H9 You can't reference a range of cells like this: =H9:J9 That is why you're getting the error. -- Biff Microsoft Excel MVP "Jorist" <Jorist@discussions.microsoft.com> ...

Incorrect formula
Would appreciate help with my formula. I only want the 1 to be added to L28 and L29 if they have a value greater than 0. this formula produces 2 even if all the cells have nothing in them, but I need there to be nothing in the cell if no values are in any cells. If the value of every cell in the formula was 1 then my answer should be 14 but if cell L28 is 0 then the answer should be 12, and if neither L28 or L29 has a value then the answer should be 10, but because of the =1 in my formula I get an answer that is 12.(or 2 greater than I want if values are in other cells) Help appre...

Check to see if a formula is correct
I want to do something like this Sub Macro1() If Range("A1") =(=B1 + B2) Then ' This is a formula Exit Sub Else Range("C1").Select 'Has correct formula Selection.Copy Range("A1").Select Selection.PasteSpecial Paste:=xlFormulas End If End Sub How do I do this? Hi Try Sub Macro1() If Range("A1").HasFormula Then Exit Sub Else Range("C1").Copy Range("A1").PasteSpecial Paste:=xlFormulas Application.CutCopyMode = False ...

I'm trying to make a simple task, when a user owner is assigned a task in CRM, it receives an email letting it know it has one. I have the following below, but it is not generating one when i assign one manually in the CRM. What to do? I've tried both the following: When task is created E-Mail to:[owner];Subject test As well as: When task is created if Task activity status = Open then E-Mail to:[owner];Subject test I've checked the mailserver many times over, and I can send emails manually from the CRM so you can rule that out Tested out ok on our end. Some ideas:...

Inserting rows with Data, Formula's and Validation
Hi all, I posted this twice earlier today, but it hasn't appeared so if it triple post please forgive! I have a spreadsheet that starting at row 18 contains the following information A18=M\$2 B18= Datavalidation indirect (\$M\$2) C18=IF(B18="No More Options",VLOOKUP(\$B18,INDIRECT(CONCATENATE(\$M\$2,"_info")),1,FALSE),IF(B19<2,VLOOKUP(\$B18,INDIRECT(CONCATENATE(\$M\$2,"_info")),1,FALSE),CONCATENATE(B19," x ",VLOOKUP(\$B18,INDIRECT(CONCATENATE(\$M\$2,"_info")),1,FALSE)))) E18=IF(ISERROR(VLOOKUP(\$B18,INDIRECT(CONCATENATE(\$M\$2,"_info"))...

Mailbox not created when AD account created
A couple of days ago I noticed that I created a user account but the 'Email Addresses' tab of the user properies did not list any email addresses. Subsequent new user accounts have all experienced the same. I researched the knowledge and tried the recommended solutions to either manaully start the recipient update service or rebuild te recipient update service. Neither recommendation has resulted in a mailbox being created for this particular user or any additional user that I have created since this error first showed up. I performed a Windows update last Thursday and so I bel...

Help Creating XmlNode / XmlAttribute Elegantly
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString" value="server=(local);" /> </appSettings> </configuration> I am using a XmlDocument for my base implementation. I am looking to see if there is a better way to add a new node / attribute than using XmlDocument.InnerXml. I would consider this to be a hack but couldn't really see another way of doing this without definin...

Create external database
Hi all. I need to create an external database (file). On a site I found this code: ------------------------------------------------------ Function CreateLinkedExternalTable(strTargetDB As String, strProviderString As String, strSourceTbl As String, strLinkTblName As String) As String 'strTargetDB = Source Database Name 'strProviderString = Not used, currently hard coded 'strSourceTbl = Source Table name in the database we are linking too. 'strLinkTblName = Table name we would like to see in the Access Database. Dim catDB As ADOX.Catalog Dim tblLink As...

#Value
I need to add 2 cells (E24+E44), how can I achieve this without getting #Value when zero value? Hi Margo, Check your data. The only way you should be getting #Value is if a number is actually being interpreted as text instead of a value. The data in either E24 or E44 has to be text instead of a value. >-----Original Message----- >I need to add 2 cells (E24+E44), how can I achieve this >without getting #Value when zero value? >. > ...

How to create pie chart with %
I have got a problem that I don't if excel could help me to calculate the % within a column and draw a pie chart. My case is I have a column containing a series of numbers. e.g. 1,4,8,1,3,9,11,2,4,5,6,.........etc I want to draw a pie chart that showing 1-3 , 4-6, 7-9, >9 with the corresponding % inside that column. Can anyone tell me how can I make it ? Ray - You need to calculate the frequencies in your data. Let's assume your data is in A1:A12. In B1:B3 enter these numbers, the upper limits on the groupings: 3 6 9 You can enter ">9" into B4 witho...

Email address not created when a new user is created
All, This issue recently happened in my company. Upon creating a new user, the policy was set to create the smtp and X400 address automaticaly. Now when we create a user the smtp and x400 addresses are not created, and when attempting to setup the new user in outlook, the address cant be found. We are using exchange 2003 SP1 on Win2k3 servers. On Wed, 13 Jul 2005 06:49:07 -0700, "Bryan" <Bryan@discussions.microsoft.com> wrote: >All, >This issue recently happened in my company. Upon creating a new user, the >policy was set to create the smtp and X400 addres...

Counting Unique Values
=SUMPRODUCT(--(INT(A7:A9)=INT(B2)),--(C7:C9="Good"),B7:B9) Hi. Thank you for the formula ABOVE which enabled me to >Count the number of Good Cancel Requests based on Matching the >Date in B2 with a Date (in a "custom" format) in A7:A9. > > >My next question is if the formula can be modified to do >the same date matching and BUT Count the unique values in >B7:B9 . > > > A B > 2 Monitoring Statisitics 05/24/04 > 3 # Cancel Requests 3 > 4 Volume of Cancel Requests ...

when form created
I have a form which was created by someone else (not a form template) which is like a questionnaire with empty boxes to be completed. When the boxes are typed in all the margins move to accommodate the words being typed. Is there a way to fix/lock the original form and then just fill in the blank boxes? I suspect this is set up as a table with auto resizing enabled. Displaying table gridlines (Table | Show Gridlines) will help you see what you're dealing with. Then select the table, go to the Table tab of Table Properties, click Options, and clear the check box for "A...

Exchange 2010 MRM, no log files being created
I'm hoping someone can help me with this issue....it has been driving me crazy for days. I have enabled MRM logging on our exchange server, and I can see that some of the policies are working when I run start-managedfolderassistant. We have a retention policy tag on the deleteditems folder, and this does work. The problem is I am not getting any files in the MRM log directory. C:\Program Files\Microsoft\Exchange Server\V14\Logging\Managed Folder Assistant Events 9021 and 9022 are logged in the Application log, but where are the files? Below is the output of my mai...

Creating a Brochure
How do you create a 3-column brochure from scratch for Publisher 2002? I can only find the directions for the 2003 version. Quick help would be appreciated, project is due Monday. Create a three-panel or four-panel folded publication http://office.microsoft.com/en-us/assistance/HP011646681033.aspx Scroll down to the section that says "Build a three-panel or four-panel publications from scratch." -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Derek" <Derek@discussions.microsoft.com> wrote in message news...

How to create Access macro shortcut
I'm still using Access 97 and saw something the other day that I would like to use that was in Access 2000. In an Access 2000 database, there was a .mam file in a directory that launched the Access 2000 program and ran a macro. How do you set this up? Can it be done in Access 97? If so, how? Hi. > How do you set this up? Select the macro in the Database Window and right click with your mouse, then select "Create Shortcut..." in the pop-up menu. Follow the prompts for where to place the shortcut and what to name it. The default is: <PathToDeskTopDir>\Shortcut ...

OWA and Domain\User Name Logon
Something strange happened to the logon requirements when logging onto OWA... Initially when I configured OWA the user was required to use his or her domain with their username when logging onto OWA. Now, the domain portion before the user name is no longer required. Although more convenient for the user to logon this way, I'd like to see the logon requirements as they were with the domain portion of the logon required. I am wondering what could have happened to change this feature. Any ideas? How would one change it back? Thanks in advance. Raymond- If somebody put a \ in the default...

Users mailboxes not created when user created
I have a problem that recently just started happening on my exchange 2003 server. When i create a new user account and create the mailbox for exchange, once im done, the mailbox isnt created, adn if you go into the properties of the user account adn go to the exchange email address tab, there isnt an smtp or an x.400 address listed. I am having to manually create and add these, adn then go delete the exchange mailbox and recreate it. This is really annoying and would love to know if anyone has any ideas of how to fix it. Thanks Jason In news:9F836A43-98BF-435A-AA43-AFF10124BE3F@micro...