+ Reply to Thread
Results 1 to 8 of 8

If function not working (macro)

  1. #1
    Registered User
    Join Date
    04-27-2016
    Location
    La Quinta, CA
    MS-Off Ver
    2010
    Posts
    24

    If function not working (macro)

    Hello all,

    So I have formulated an "IF" function as per below:

    =IF(H486:H489>7.99,0.33,0.17)

    But when I apply it to the following table, it's not returning the desired value....what could be the cause of this? Thank you in advance.

    Capture.JPG

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: If function not working (macro)

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    04-27-2016
    Location
    La Quinta, CA
    MS-Off Ver
    2010
    Posts
    24

    Re: If function not working (macro)

    Thank you so much for your response Kaper!

    What i am trying to achieve, is if the sum of 4 rows combined is greater than 8, then the 0.33, if not, then 0.17.

    Thank you!

  4. #4
    Registered User
    Join Date
    04-27-2016
    Location
    La Quinta, CA
    MS-Off Ver
    2010
    Posts
    24

    Re: If function not working (macro)

    Sorry....greater than 7.99

  5. #5
    Registered User
    Join Date
    04-27-2016
    Location
    La Quinta, CA
    MS-Off Ver
    2010
    Posts
    24

    Re: If function not working (macro)

    Please note that there is a 1 as well in h486.

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: If function not working (macro)

    Quote Originally Posted by mrgrape View Post
    is if the sum of 4 rows combined is greater than 8
    Looking at your comment quoted above, and your original formula, =IF(H486:H489>7.99,0.33,0.17) the problem becomes clear.

    =IF(SUM(H486:H489)>7.99,0.33,0.17)

    Without a function specified, only the cell in the same row as the formula is used, the other 3 are ignored.

  7. #7
    Registered User
    Join Date
    04-27-2016
    Location
    La Quinta, CA
    MS-Off Ver
    2010
    Posts
    24

    Re: If function not working (macro)

    Thank you so much! That was the problem....how could I have overlooked that. Again, thank you so much!

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: If function not working (macro)

    Quote Originally Posted by mrgrape View Post
    ....how could I have overlooked that.
    You would be surprised how often similar questions appear on the forum, the simplest mistakes are often the hardest to see.

+ 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. Macro with consolidation function not working when using the file in Dropbox folder
    By jmlachance in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2015, 03:20 PM
  2. Need help to loop function for working macro
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2014, 05:53 AM
  3. Today function is not working in Macro
    By abduljaleel.mca in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2013, 07:04 AM
  4. Problems With Sum function working when using macro to add in template
    By neil__g in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2012, 06:09 AM
  5. If function working but not in Macro
    By KarlSm in forum Excel General
    Replies: 6
    Last Post: 05-19-2011, 04:09 PM
  6. "Find" function in Macro not working
    By TRJJK73 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-12-2009, 08:59 AM
  7. Macro =sum function not working correctly
    By crowdx42 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-21-2006, 12:47 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