+ Reply to Thread
Results 1 to 11 of 11

Cannot get a formula array to return the correct count of list items

  1. #1
    Registered User
    Join Date
    01-25-2009
    Location
    hemsworth, england
    MS-Off Ver
    Excel 2003
    Posts
    25

    Cannot get a formula array to return the correct count of list items

    I have an array formula that extracts sequences and start time periods eg "1A, 2A .. 3B" (from the data block starting at G2 in the attached ) I have managed to compose a formula array that extracts the data required and places it at D17:D28.

    What I can't fathom out is how to extract this data only when column G contains say "R4". Can it be done?

    Sorry if this is not clear hope the attachment helps . The red fill shows the data.It would appear that the repeating sequence at row 103 is not picked up when the "R4" search is introduced.

    The first formula
    Please Login or Register  to view this content.
    works fine

    The second
    Please Login or Register  to view this content.
    fails
    when I add in
    Please Login or Register  to view this content.
    Thanks for reading this far
    Attached Files Attached Files
    Last edited by macyarab; 01-21-2012 at 05:39 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cannot get a formula array to return the correct count of list items

    Hi,

    It works OK for me. Are you sure you're entering it as an array formula with Ctrl-Shift-Enter?

    Just an observation, but did you mean to have different ranges, i.e. 3:848 and 4:849. This won't return an error since both ranges are the same size, but it looks unnatural.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Cannot get a formula array to return the correct count of list items

    Is the R4 supposed to be checked in column G only?

    Please Login or Register  to view this content.
    note: Using SUMPRODUCT eliminates need in this case to use CSE confirmation.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    01-25-2009
    Location
    hemsworth, england
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Cannot get a formula array to return the correct count of list items

    The different range is to pick up the time periods. The second formula appears to work but when you check the data it can be seen to miss the second sequence along row 103(see red font).

    Thankyou for having a look.I am impressed It would take me a week to work out someone elses formula .

  5. #5
    Registered User
    Join Date
    01-25-2009
    Location
    hemsworth, england
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Cannot get a formula array to return the correct count of list items

    Yes but to count the result of the first formula when it coincides with the "R4" in the G column.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Cannot get a formula array to return the correct count of list items

    Did you try mine? Is it wrong?

  7. #7
    Registered User
    Join Date
    01-25-2009
    Location
    hemsworth, england
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Cannot get a formula array to return the correct count of list items

    oops didn't realise that it wasn't my original... sorry will give it a try now (excuse my ignorance but what does "CSE confirmation" mean.

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cannot get a formula array to return the correct count of list items

    CSE means you should use the CTRL-SHIFT-Enter keys all held down together to enter the formula. You'll then see {} brackets at either end of the formula in the formula bar telling you it is an array formula.

  9. #9
    Registered User
    Join Date
    01-25-2009
    Location
    hemsworth, england
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Cannot get a formula array to return the correct count of list items

    Have just tried it in the example sheet appears good. thankyou. I will try it in the main sheet tomorrow (pub night calls)

  10. #10
    Registered User
    Join Date
    01-25-2009
    Location
    hemsworth, england
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Cannot get a formula array to return the correct count of list items

    Wow! put your suggestion into my main wbook and oh joy ... it is spot on Thankyou.

    Given me something to think about as I don't really understand the difference between sumproduct and the sum in a formula array.

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cannot get a formula array to return the correct count of list items

    Hi,
    SUMPRODUCT() is designed to work as an array formula and hence doesn't need to be made into one.
    =SUM() and others, if you want them to operate as array formulae do need the CSE

    Regards

+ 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