Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Excel 2003 comparison formula

May 22, 2005 12:57AM PDT

I need a formula that will compare numbers in column B to numbers in column A and then report in column C whether the numbers in column B are greater than, less than or equal.

Example:

A B C
105 110 +5
110 110 0
115 110 -5

Discussion is locked

- Collapse -
I would call the example a subtract:
May 22, 2005 1:21AM PDT

C1: =B1-A1
That's not a too difficult formula, I would say.

Or maybe you want a custom format? That's quite something else as a formula. In that case: try +0,-0,0

Or maybe something else? Please clarify your question then.

Kees

- Collapse -
Solution
May 23, 2005 9:55AM PDT

Well thanks indeed. I'm trying to complicate things more than is necessary.

- Collapse -
A textual solution
May 23, 2005 7:19PM PDT

Since you were asking for a textual answer regarding the value of the B cell to the A cell, here is a formula that will give that answer and the value of the difference as well.

=IF(A1>B1,("B is LESS than A by "&(A1-B1)),IF(A1=B1,"B is EQUAL to A",("B is MORE than A by "&(B1-A1))))

The three answers will be one of:
B is LESS than A by __
B is EQUAL to A
B is MORE than A by __