Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: comparing two cells

  1. #1
    Guest

    Default

    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!

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Of course this formula would only really be any good if it was numeric values you were comparing...

  4. #4
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,632
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default

    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
    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.


Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •