+ Reply to Thread
Results 1 to 6 of 6

building arrays from cells and/or ranges

  1. #1
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    building arrays from cells and/or ranges

    I have the following formula
    Please Login or Register  to view this content.
    which works fine when my inputs are =CofM(RangeA,RangeB)
    however I need it to also work with =CofM((cell1,cell2,cell3),(cell4,cell5,cell6))

    How do I get it to accept RangeA or cell1,cell2,cell3 or cell1,RangeA,cell2 as Array1?

    I have been trying to use =SumProduct((cell1,cell2,cell3),(cell4,cell5,cell6)) in varying forms to see if SumProduct can build an array from selected cells (similar to how Sum can be =Sum(range) or =Sum(num1,num2,num3)) with no luck so far.
    Last edited by Leon V (AW); 08-06-2013 at 05:12 AM. Reason: solved be Joseph

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: building arrays from cells and/or ranges

    and how you tackle.. sumproduct part.. as sumproduct needs same length of range..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: building arrays from cells and/or ranges

    perhaps
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: building arrays from cells and/or ranges

    Hi josie,

    cell1,RangeA,cell2
    that line make me confused.. that OP wants.. parameters as "Param Array"..
    Crossing finger, that OP dont want something like.. A2,A5:A17,B9

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: building arrays from cells and/or ranges

    entering
    =CofM((cell1,cell2,cell3),(cell4,cell5,cell6))
    passes 2 arguments (both ranges albeit with multiple areas for each range) so no need for a paramarray ;-)

  6. #6
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: building arrays from cells and/or ranges

    I think that has worked. I was worried that n would be limitted to 255 but I have tried a range of 300 and it works. thanks for that

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Building macro to split out ranges
    By Culvernator in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2011, 05:47 PM
  2. Replies: 0
    Last Post: 02-22-2011, 11:31 AM
  3. Building a Dynamic Chart using ranges in rs1 method
    By Dannypak in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-03-2010, 11:01 AM
  4. limiting source ranges when building charts in vba
    By Benoit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2006, 02:55 PM
  5. [SOLVED] Limiting ranges when building charts in vba
    By Benoit in forum Excel General
    Replies: 0
    Last Post: 03-20-2006, 07:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1