+ Reply to Thread
Results 1 to 8 of 8

having problem in sumproduct with three conditions

  1. #1
    Registered User
    Join Date
    10-20-2012
    Location
    Houston, TX USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    Question having problem in sumproduct with three conditions

    I am using this code in VBA and not getting correct result.
    In below code value of "val" variable should be 57 but it gives me zero. Looks like I am missing something here and need second pair of eye to catch it.

    Any suggestion?


    Please Login or Register  to view this content.
    Thanks,
    -Anand

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: having problem in sumproduct with three conditions

    Hi

    Maybe value4 should be a blank not a space???

    If not then example file time...

    rylo

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: having problem in sumproduct with three conditions

    Anand

    Are you sure all the addresses are right?

  4. #4
    Registered User
    Join Date
    10-20-2012
    Location
    Houston, TX USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: having problem in sumproduct with three conditions

    Yes, all the addresses are correct.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: having problem in sumproduct with three conditions

    Anand

    That code doesn't compile for me - Val is a VBA function.

    Is that the exact code?

    How about rylo's suggestion?

  6. #6
    Registered User
    Join Date
    10-20-2012
    Location
    Houston, TX USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: having problem in sumproduct with three conditions

    Thank you Rylo for responding, I tired your suggestion but it did not work for me.

    Norie, I am using similar code, not the same, let me prepare a sample file and I will attach here shortly.

    Thanks!

  7. #7
    Registered User
    Join Date
    10-20-2012
    Location
    Houston, TX USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: having problem in sumproduct with three conditions

    Well, when I tried to create a sample file using similar code then it worked okay with Rylo's suggestion.

    so it looks like there is something missing in my workbook macro, I will try to simplify it and post it by tomorrow evening US time.

    Thanks!

  8. #8
    Registered User
    Join Date
    10-20-2012
    Location
    Houston, TX USA
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: having problem in sumproduct with three conditions

    I end up using alternate route as below:
    Please Login or Register  to view this content.
    Thank you all for your help!

+ 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