+ Reply to Thread
Results 1 to 9 of 9

Using Name Ranges as an Array

  1. #1
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Using Name Ranges as an Array

    Dear all,

    I'm trying to use =SUMPRODUCT() for its very basic use. However, I have defined a few named ranges.

    For example, I have these few named ranges.
    "WeekdayPrice" = 20
    "WeekendPrice" = 50

    I am trying to use this in SUMPRODUCT(), in the sense
    $A$1:$B$1 contains the attendance for weekday and weekend respectively.
    Please Login or Register  to view this content.
    However, this does not work.

    Please assist? This is a very simplified version of it, as I have used OFFSET, INDEX and MATCH to find the attendance for weekday and weekend. I have verified that it works correctly.

    Thank you very much.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Using Name Ranges as an Array

    You can't use named ranges, range or cell references in array {}.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Or
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Re: Using Name Ranges as an Array

    What I'm trying to achieve is actually, sum of all the attendance * price
    Please Login or Register  to view this content.
    But, I have alot of prices (actually about 30 prices) to consider, hence, I've used OFFSET after INDEX and MATCH to select an array and trying to use SUMPRODUCT.
    Last edited by excelforum123; 03-18-2013 at 02:32 AM.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Using Name Ranges as an Array

    Extend the Range if required.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Re: Using Name Ranges as an Array

    Sorry. I don't really understand where you are coming from.

    Basically I have about 30 prices and 30 list of attendances.

    So
    Please Login or Register  to view this content.
    .

    For each Attendance, I'm using INDEX and MATCH to find the right attendance for the right employee.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Using Name Ranges as an Array

    Sorry I am unable to suggest something on assumption instead show us a sample workbook with dummy data by convering the expected output for better understanding

  7. #7
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Using Name Ranges as an Array

    Hi excelforum123

    How about using SUMIFS or may be: =SUM(SUMIF(YourCriteriaRange,{"Criteria1","Criteria2","Criteria3","Etc"},YourSumRange))
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Using Name Ranges as an Array

    Hi Kevin UK,

    Did you seen the text of Post #2?

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Using Name Ranges as an Array

    The obvious answer would appear to be

    =SUMPRODUCT(attendances,prices)

    where attendances is a contiguous range of all 30 attendances, prices is a similarly oriented contiguous range of all 30 prices

    I'm assuming that you can't do that - is that because the cells are not in a single range or you just don't want to name the whole range?
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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