+ Reply to Thread
Results 1 to 20 of 20

Displaying a symbol based on a value being smaller then/greater then or equal to a number

  1. #1
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Displaying a symbol based on a value being smaller then/greater then or equal to a number

    I cross-posted this question on mrexcel.com forums.

    But I am unable to post the link to the forum thread.

    I am using the following formula to check if a number is higher then another number, if yes I get a ✓ and if no I get a ✕.

    =IF(H29 >=L29;"✓";"✕")

    I am trying to do this with the following formula:

    =IF(H29<>"";IF(L29<>"";IF(H29>=L29;"✓";"✕")))

    What do I need to change for the formula to display "✕" if the cell H29 is blank and/or the cell L29 is blank? And then show ✓ if the cell H29 is larger then/smaller then or equal to L29.

    Also, if H29 and L29 are blank then the formula returns false, I want it to return ✕.

    How can I do this so that it shows ✕ if one or both cells are blank, "" or 0. And that it only shows ✓ if both cells are not blank, "" or 0 and if H29 is bigger then/smaller or equal then L29?

    In summary, I want to show two different symbols based on the value of 2 different cells.
    Last edited by waimea; 06-30-2018 at 01:33 PM.

  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
    81,194

    Re: IF function

    Welcome to the forum! Please take a moment to re-read forum rule #1 and then amend your thread title to something that better explains your problem. Changing your thread title is not optional, which means you must change it. Thanks!

    • Use concise, accurate thread titles.
    • Your post title should describe your problem, not your anticipated solution.
    • Use terms appropriate to a Google search - poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice tell us nothing.
    • Responding to a request to change your thread title by doing so is mandatory.

    To change a title go to your first post, click EDIT then Go Advanced and change your title.

    No help to be offered, please, until the OP complies with this request.
    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 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
    81,194

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    That’s better - thanks!

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

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    See if this works

    =IF(AND(H29<>"";L29<>"";H29>=L29);"✓";"✕")

  5. #5
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Thank you for your reply, it works but if H29 and / or L29 is 0 or 0,00 I get a ✓ but I want a ✕.

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

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Do both have to be <> 0?

    =IF(AND(N(H29);N(L29);H29>=L29);"✓";"✕")

  7. #7
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    In the best case scenario all values of H29 and L29 are not 0, empty or "".

    However if H29 and / or L29 is empty I would like to get a ✕. I don't really understand the last formula but I think it's not doing what I want.



    H29 L29
    40 39,9
    This would give me a ✓.

    H29 L29
    40 40
    This would give me a ✓.

    H29 L29
    39 40
    This would give me a ✕.

    H29 L29
    0 40
    This would give me a ✕.

    H29 L29
    40 0
    This would give me a ✕.

    H29 L29
    0 0
    This would give me a ✕.
    Last edited by waimea; 06-30-2018 at 12:54 PM.

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

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    The formula in post 6 checks that both H29 and L29 contain a number other than 0, and that H29 is not less than L29.

    If it's not doing what you want, please provide some examples where it gives the incorrect result.

  9. #9
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    You are correct, I though that the formula didn't update the ✓ properly but it was down to the first decimal not showing that it didn't update.

    Thank you for your time and your answer! I also posted this on mrexcel, can I post your answer there?

  10. #10
    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
    81,194

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    If you have less than 10 posts, do not try to copy and paste the link. Instead, type the link out in your thread.

    No further help to be offered, please, until the OP has complied with this request.

  11. #11
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Quote Originally Posted by jason.b75 View Post
    Do both have to be <> 0?

    =IFERROR(IF(AND(N(H29);N(L29);H29>=L29);"✓";"✕");"✕")
    Would it be possible to extend your formula and check if H29 is empty and if yes, then compare G29 with L29 with the same logic as above, G29 and L29 are both not null.

  12. #12
    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
    81,194

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Thank you for adding the cross-post information requested.

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

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Try

    =IFERROR(IF(AND(N(H29);N(L29);H29>=L29);"✓";IF(AND(N(G29);N(L29);G29>=L29);"✓";"✕"));"✕")

    In the event that both G29 and H29 both contain numbers, H29 will be evaluated.

  14. #14
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Thank you, it works beautifully!

  15. #15
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Would it be possible to extend it one more time with another if clause, to check if F29 contains a value and is not empty?

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

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    Following the same logic as above

    =IFERROR(IF(AND(N(H29);N(L29);H29>=L29);"✓";IF(AND(N(G29);N(L29);G29>=L29);"✓";IF(AND(N(F29);N(L29);F29>=L29);"✓";"✕")));"✕")

  17. #17
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    I tried following the same logic w/o a working formula.

    I could be wrong but I think that this formula

    if

    H29 is smaller then L29

    and

    G29 is larger then L29 then I get a ✓

    also if

    H29 is larger

    then L29 I get a ✓. Following the same logic?



    I am not sure of my logic but I made this case picture to show when the formula doesn't work as I would like.

    excel-problem.png

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

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    I think I see where I went wrong, I should have changed the logic instead of just adding to it. See if this gives the expected results.

    =IFERROR(IF(AND(IF(N(L29);LOOKUP(2;1/(F29:H29>0);F29:H29)>=L29));"✓";"✕");"✕")

  19. #19
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

    It works perfectly! Thank you.

  20. #20
    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
    81,194

    Re: Displaying a symbol based on a value being smaller then/greater then or equal to a num

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

+ 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. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  2. Replies: 3
    Last Post: 08-14-2017, 06:26 AM
  3. Replies: 2
    Last Post: 04-23-2017, 12:04 AM
  4. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  5. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  6. [SOLVED] Using Offset function as the array in the PercentRank function is giving wrong result
    By Bobneil in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-06-2013, 09:29 PM
  7. Replies: 1
    Last Post: 03-21-2012, 11:22 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