+ Reply to Thread
Results 1 to 13 of 13

SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

  1. #1
    Registered User
    Join Date
    04-16-2020
    Location
    Coimbatore, India
    MS-Off Ver
    Office 365
    Posts
    5

    SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Dear Friends,

    Greetings! Hope you guys are safe at home with social distancing.

    I want to make this below formula work in cell B1 (refer below excel file or attached snapshot):
    =SUMPRODUCT(--(CELL("format", B3:K3)=",0"), M3:S3)

    Pl let me know:
    1. Whether this is possible ONLY with formulae? I do not need VBA code.
    2. If possible, what corrections I should do to this formula to work.

    Pl help.

    Thank you in advance,

    Regards,
    Bharath Kumar S T
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,613

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Welcome to the forum.

    Unfortunately, you do not tell us what you are trying to do. This might be a good first step!
    Last edited by AliGW; 04-16-2020 at 11:00 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    the requirement is unclear as you don't outline expected result

    in short, no, CELL will not return an array
    (if you care only about whether or not the cell contains a number that's trivial enough)

    you don't elaborate on the relationship between your two arrays which, given they have different dimensions, is (perhaps) important

    so, given example, what is the expected result - and why ?

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Hi,

    I presume you meant B3:H3, not B3:K3 as you give in your formula? The latter comprises 10 columns, and so will return an error when SUMPRODUCTed with M3:S3 (which is only 7 columns).

    CELL requires a little coercion in order to return an array.

    =SUMPRODUCT(--(CELL("format",OFFSET(B3,,N(INDEX(COLUMN(B3:H3)-MIN(COLUMN(B3:H3)),,))))=",0"),M3:S3)

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Quote Originally Posted by XOR LX View Post
    CELL requires a little coercion in order to return an array.
    Nice! Another one to log for future reference... thanks XOR LX

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Quote Originally Posted by XLent View Post
    Nice! Another one to log for future reference... thanks XOR LX
    Sure, just don't ask me to explain the reasons for that coercion!

    (Although Lori gives it a go in the comments to my post here.)

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    How about
    =SUMPRODUCT(--ISNUMBER(B3:H3),M3:S3)

    or
    =SUMIFS(M3:S3,B3:H3,">0")

  8. #8
    Registered User
    Join Date
    04-16-2020
    Location
    Coimbatore, India
    MS-Off Ver
    Office 365
    Posts
    5

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Quote Originally Posted by XOR LX View Post
    Hi,

    I presume you meant B3:H3, not B3:K3 as you give in your formula? The latter comprises 10 columns, and so will return an error when SUMPRODUCTed with M3:S3 (which is only 7 columns).

    CELL requires a little coercion in order to return an array.

    =SUMPRODUCT(--(CELL("format",OFFSET(B3,,N(INDEX(COLUMN(B3:H3)-MIN(COLUMN(B3:H3)),,))))=",0"),M3:S3)

    Regards
    Dear Friend, Thank you very much. It worked and this formula is what I was searching to perform the function. Thank you very much once again ! Regards,

  9. #9
    Registered User
    Join Date
    04-16-2020
    Location
    Coimbatore, India
    MS-Off Ver
    Office 365
    Posts
    5

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Thank you, but I want to use CELL function only. THank you for the effort of responding. Have a nice day!

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  11. #11
    Registered User
    Join Date
    04-16-2020
    Location
    Coimbatore, India
    MS-Off Ver
    Office 365
    Posts
    5

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Thank you for the greetings! I want to SUMPRODUCT only for the cells which have the number format.

  12. #12
    Registered User
    Join Date
    04-16-2020
    Location
    Coimbatore, India
    MS-Off Ver
    Office 365
    Posts
    5

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Thank you very much friends! You guys made my life simple. Pl stay safe my friend. Have a healthy life.

  13. #13
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMPRODUCT of CELL FORMAT FUNCTION in a array - ONLY USING FORMULAE

    Quote Originally Posted by stbharathkumar View Post
    Dear Friend, Thank you very much. It worked and this formula is what I was searching to perform the function. Thank you very much once again ! Regards,
    You're welcome!

    Cheers

+ 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. How to dynamically set array size in sumproduct function.
    By sumdumgai in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-13-2020, 03:43 AM
  2. [SOLVED] Avoid an Array Function by using Sumproduct
    By ibuhary in forum Excel General
    Replies: 8
    Last Post: 08-28-2018, 03:04 PM
  3. Replies: 3
    Last Post: 11-05-2015, 09:09 PM
  4. Why a parameter behaves like an array in SUMPRODUCT Function..?
    By Vikas_Gautam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2014, 10:21 AM
  5. How to use SUMPRODUCT or other function to SUM array of values
    By netgroover in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2013, 09:06 PM
  6. [SOLVED] OR function within a sumproduct formulae
    By Fursmanm in forum Excel General
    Replies: 3
    Last Post: 10-03-2012, 08:30 AM
  7. [SOLVED] Sumproduct + Array Function?
    By Darren Hill in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-08-2005, 09: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