comparing two cells

G

Guest

Guest
Hi Guys...

I would like to compare two colums ("A" vs. "B")in order to tell if the items in the corresponding cells in column B are smaller than in B. (for example, I would like some way of knowing if B30 was smaller than A30, etc.) I know a formula exists...maybe there is a way to highlight all the instances where B is smaller than A? Or perhaps some other similar way to accomplish what I am explaining....any help is appreciated!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hey there,

I believe the formula you'll need is:

=if(b30<=a30,"Specify an alert message","")

You could then conditionally format these cells to change colour or something if the argument returns true
 
Upvote 0
Of course this formula would only really be any good if it was numeric values you were comparing...
 
Upvote 0
On 2002-02-25 06:23, Anonymous wrote:
Hi Guys...

I would like to compare two colums ("A" vs. "B")in order to tell if the items in the corresponding cells in column B are smaller than in B. (for example, I would like some way of knowing if B30 was smaller than A30, etc.) I know a formula exists...maybe there is a way to highlight all the instances where B is smaller than A? Or perhaps some other similar way to accomplish what I am explaining....any help is appreciated!

Assuming that your data starts in row 1,

in C1 enter: =(A1<B1)+0

Select all of the cells of C, activate Format|Cells, choose Custom, and enter in the Type box:

[=0]"No";[=1]"Yes"

The above gives you the choice to

=SUM(C:C)

in order to know how many A-cells are smaller than B-cells.

Alternatively, you can apply Conditional Formatting, e.g., to column A in order to color A-cells that are smaller than corresponding B-cells.
 
Upvote 0

Forum statistics

Threads
1,214,389
Messages
6,119,232
Members
448,879
Latest member
VanGirl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top