+ Reply to Thread
Results 1 to 10 of 10

Sum If Array Formula give False Output Instead of Answer

  1. #1
    Registered User
    Join Date
    11-07-2014
    Location
    India
    MS-Off Ver
    2016
    Posts
    88

    Sum If Array Formula give False Output Instead of Answer

    Dear Sir,

    What is wrong in this macro code? I am getting 'False' instead of answer in AE column.

    Please Login or Register  to view this content.
    P.S: This formula work fine without macro. This is how it's look when use directly in the excel file.


    =SUMIF('[Sell Out.xlsx]Sheet1'!$B:$B,"="&B2,'[Sell Out.xlsx]Sheet1'!$J:$J)

    And, this is working fine.

    Please help

    Regards
    Kaustubh

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi !

    So just compare the VBA final string with the real cell formula …

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Lightbulb


    If the VBA string is correct, try with FormulaArray property …

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Sum If Array Formula give False Output Instead of Answer

    Works fine like this.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Sum If Array Formula give False Output Instead of Answer

    Try change to
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-07-2014
    Location
    India
    MS-Off Ver
    2016
    Posts
    88

    Re: Sum If Array Formula give False Output Instead of Answer

    Formula is working now but it is not giving the right answer. Now, I am getting #Value error on using formula post suggested changes. Without "=" and '&' sign (before B2), I am not getting the correct answer.
    Please help.

    Regards

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Sum If Array Formula give False Output Instead of Answer


    So the formula within the VBA code seems to not be correct.
    First apply manually a formula in a cell and once the result is the expected one, share it !
    It would be far easier to understand what's wrong on VBA side …

  8. #8
    Registered User
    Join Date
    11-07-2014
    Location
    India
    MS-Off Ver
    2016
    Posts
    88

    Re: Sum If Array Formula give False Output Instead of Answer

    Finally it worked. Thanks everyone for the help.

    There were two error as mentioned below ( will help someone who face the same problem)

    1. Add ""="", double quotes before and after equal to sign.
    2. I was trying to apply the above formula in closed workbook. Hence it was not working. It work fine when I add the code to open the given file.

    Once again, thanks everyone for the help.

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Sum If Array Formula give False Output Instead of Answer

    The formula works as well without the "=" sign.

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

  10. #10
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Sum If Array Formula give False Output Instead of Answer

    As an aside, to isolate a filename from the full path of a closed file., you could use Dir function...
    Please Login or Register  to view this content.

+ 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. If condition give False answer
    By master sachin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-05-2019, 10:14 AM
  2. [SOLVED] Formula to give a yes/no answer based on chart
    By Tarontagosh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2017, 10:49 AM
  3. Replies: 4
    Last Post: 08-28-2015, 08:43 AM
  4. [SOLVED] I need a current formula to only give me an answer if column W says DUI Help please! TY
    By LaurieLaurie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2013, 08:30 PM
  5. Exclude blank/FALSE cells in in Excel array IF formula output
    By sushix in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-08-2013, 11:42 AM
  6. Formula that will give me True or False results
    By Reenee in forum Excel General
    Replies: 2
    Last Post: 02-02-2009, 10:36 AM
  7. Need help with formula to give 0 if value is negative or answer is
    By Sharona77 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-01-2006, 04:45 PM

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