Excel function formula, when B is greater than a, it is equal to a, when B is less than a, it is equal to B

Excel function formula, when B is greater than a, it is equal to a, when B is less than a, it is equal to B


=IF(B1>A1,A1,B1)



Function formula of excel a column downward data less than, equal to and greater than upward data
If the downlink data in column A is less than the uplink data, it is indicated by 1, and 1 is displayed in column B;
When the downlink data and uplink data in column a are equal, it is represented by 2, and 2 is displayed in column C;
If the downlink data in column A is larger than the uplink data, it is represented by 3, and 3 is displayed in column D (as shown in the figure). What is the function formula?
A B C D
-0.243
-0.208 3
-1.042 1
-1.043 1
-0.159 3
-0.159 2


B2:=IF(A2A1,3,"")
All pull down