# Comparison Operators in Excel

In this post, you’ll learn about comparison operators in excel and how you can use them in your Excel sheet.

## What is Comparison Operators in Excel?

The comparison operators in Excel are to check if two values are equal to each other, if one value is greater than another value, if one value is less than another value, etc.

The following steps will explain the work of comparison operators in excel:

• First, prepare an excel sheet with the required details in it.

## Equal to (=)

• The equal to operator (=) returns TRUE if two values are equal to each other.
• To check the condition use the following formula: =A2=B2 or =IF(A2=B2,”YES”,”NO”).

## Greater than (>)

• The greater than operator (>) returns TRUE if the first value is greater than the second value.
• To check the condition use the following formula: =A3>B3 or =OR(A3>B3).

## Less than (<)

• The less than operator (<) returns TRUE if the first value is less than the second value.
• To check the condition use the following formula: =A4<B4 or =AND(A4<B4).

## Greater than or equal to (>=)

• The greater than or equal to operator (>=) returns TRUE if the first value is greater than or equal to the second value.
• To check the condition use the following formula: =A5>=B5 or =COUNTIF(A2:A5,”>=20″).

## Less than or equal to (<=)

• The less than or equal to operator (<=) returns TRUE if the first value is less than or equal to the second value.
• To check the condition use the following formula: =A6<=B6 or =SUMIF(A2:A6,”<=20″).

## Not Equal to (<>)

• The not equal to operator (<>) returns TRUE if two values are not equal to each other.
• To check the condition use the following formula: =A7<>B7 or =IF(A7<>B7,”YES”,”NO”).
{"ft_lang_label":"__label__en","ft_lang_prob":0.8120746,"math_prob":0.9959755,"size":1708,"snap":"2021-43-2021-49","text_gpt3_token_len":431,"char_repetition_ratio":0.16255869,"word_repetition_ratio":0.32,"special_character_ratio":0.27927402,"punctuation_ratio":0.105882354,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999244,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-23T07:17:25Z\",\"WARC-Record-ID\":\"<urn:uuid:872fec48-0b6d-4085-85ad-c7cd2cc6bf57>\",\"Content-Length\":\"156712\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:097cb424-a4db-41c3-ada3-64e3b759ca4e>\",\"WARC-Concurrent-To\":\"<urn:uuid:177466e4-b0e6-42b3-9846-606f501a8701>\",\"WARC-IP-Address\":\"104.21.0.189\",\"WARC-Target-URI\":\"https://developerpublish.com/comparison-operators-in-excel/\",\"WARC-Payload-Digest\":\"sha1:BXII7DKKDKILGF7IVKDBDLJWN5D2IFEZ\",\"WARC-Block-Digest\":\"sha1:JK6ISWPWJADVHXLZPPUPU64YEAMDS5NI\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585653.49_warc_CC-MAIN-20211023064718-20211023094718-00709.warc.gz\"}"}