# How to create a GREATER THAN formula

1. ## How to create a GREATER THAN formula

I have two columns in excel 2007. The columns are (price) and (MSRP). If B2 (MSRP) is greater then A2 (price) I want to replace B2 with A2.

Example:
A2: \$238.80 B2:\$299.99

Result: A2 \$299.99

What formula would I use? I think its important to note: if greater than or equal to replace. If not leave cell alone.  Register To Reply

2. ## Re: How to create a GREATER THAN formula

HI SubPar,

Welcome to the forum.

You can use below formula in column C :-

=IF(B2>=A2,B2,"")

and when done, just replace column A with column C's results if you want . thanks.

Regards,
DILIPandey

<click on below 'star' if this helps>  Register To Reply

3. ## Re: How to create a GREATER THAN formula

Perhaps..

=MAX(A2,B2)  Register To Reply

4. ## Re: How to create a GREATER THAN formula Originally Posted by dilipandey HI SubPar,

Welcome to the forum.

You can use below formula in column C :-

=IF(B2>=A2,B2,"")

and when done, just replace column A with column C's results if you want . thanks.

Regards,
DILIPandey

<click on below 'star' if this helps>
The only problem with executing this formula would be the copy/paste of the blank cells for the value it didn't change, other then that the formula is fine. Ace_XL formula resolve this, thanks. Originally Posted by Ace_XL Perhaps..

=MAX(A2,B2)

Thanks

It would be nice to have a Marcos to handle this. Do either one of you know a Marcos for this?  Register To Reply

There are currently 1 users browsing this thread. (0 members and 1 guests) 