+ Reply to Thread
Results 1 to 5 of 5

Array Formula - Help with Error in the Array

  1. #1
    Registered User
    Join Date
    04-03-2020
    Location
    Australia
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    8

    Array Formula - Help with Error in the Array

    Hi all,

    Need help with fixing an error with a formula in an array.

    Each Row in C to be divided by column B
    Range is C3 through B7
    I used {=C3:C7/B3:B7} to get the total of the result of each row, however the answer i get is zero as some of the rows are resulting in error values. Please help. Attached sample data.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Array Formula - Help with Error in the Array

    I think your intent is to perform the same calculation as =SUM(D3:D7) in D8. That is, the sum of the row-by-row ratios.

    Array-enter (press ctrl+shift+Enter instead of just Enter) the following:

    =SUM(IF(B3:B7>0, C3:C7/B3:B7))

  3. #3
    Registered User
    Join Date
    04-03-2020
    Location
    Australia
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    8

    Re: Array Formula - Help with Error in the Array

    Thanks joeu2004, this works!! as I am just getting familiar with using arrays, it has motivated me to explore using it often.

  4. #4
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Array Formula - Help with Error in the Array

    Actually, I discourage the use of array-entered formulas, if/when there is a reasonable alternative.

    The problem with array-entered formulas is: it is not uncommon to unconsiously press just Enter instead ctrl+shift+Enter. Often, that results in a #VALUE error; although that might be mysterious at first, at least it alerts us to our mistake. However, sometimes it results in a bogus result, due to "dumb luck"; so we overlook our mistake unless/until some other calculation seems incorrect. (Read about "implicit intersection".)

  5. #5
    Registered User
    Join Date
    04-03-2020
    Location
    Australia
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    8

    Re: Array Formula - Help with Error in the Array

    Thanks for the feedback, appreciate it.

+ 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. Assigning Array() to an array causes runtime error
    By cn198 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-12-2019, 07:27 AM
  2. [SOLVED] VBA copy value from array to another array - Type mismatch error
    By gargantuLars in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2019, 01:13 PM
  3. [SOLVED] Filtering an array - error when there is no longer a match in the array
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-17-2018, 11:25 AM
  4. Replies: 3
    Last Post: 04-02-2016, 08:16 PM
  5. Array problem: Key words-Variant Array, single-element, type mismatch error
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-09-2005, 01:54 AM
  6. Array problem: Key words-Variant Array, single-element, type mismatch error
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2005, 12:30 AM
  7. [SOLVED] Tricky array formula issue - Using array formula on one cell, then autofilling down a range
    By aspenbordr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2005, 11:05 AM

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