+ Reply to Thread
Results 1 to 8 of 8

Select Minimum Field

  1. #1
    Registered User
    Join Date
    07-20-2006
    Posts
    4

    Select Minimum Field

    Hey guys,

    Im having a problem with excel, made obvious by posting here

    Anyway I've got a list of names of items, and next to them I have the prices in plain decimal numbers.

    What I'm trying to achieve is to get the cheapest (lowest) result to be highlighted by say yellow. So change the background to yellow.

    I've had a look about on the website and google and can't seem to find what im looking for. I have some basic VBA knowledge but can't seem to put the logic together for it. (assuming this is a VBA task)

    If any of you could point me in the right direction. That would be great

    Thanks!

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065
    Use conditional formatting
    say names are in column A1:A100 and numbers in column B1:B100

    select cell B1

    Under menu Format / Conditonal formatting,
    select Formula in first box

    =MIN(B1:B100)

    then choose yellow background on the patterns tab
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    07-20-2006
    Posts
    4
    Hey, thanks for the quick reply.

    I've done exactly as you've said, however it's not gave me the result I expected.

    Basically this is what my "test" spreadsheet consists of (apologies for the naff drawing, seems vBulletin doesn't like lines of spaces)

    - A | B | C
    ________________
    1 | Dave 3
    2 | Sarah 2
    3 | Chris 23

    I selected B1, then clicked "Format" -> Conditional Formatting.

    Selected "Formula is" on the first drop down box, then typed in =MIN(B1:B3)

    Then I clicked teh "format" button, and selected the pattern to yellow. Basically, this just gave B1 a yellow background.

    Obviously B1 isn't the lowest number. Where've I cocked up? lol It looks like it _should_ work to me.

  4. #4
    Registered User
    Join Date
    07-20-2006
    Posts
    4
    Any ideas?

  5. #5
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    You have applied conditional formatting to the name column, hence Dave (alphabetically) is the minimum. Actually you have only applied it to the "dave" cell.

    You should highlight ALL the numbers in column C first, and the Min formula should refer to that column.

    Regards
    Mike

  6. #6
    Registered User
    Join Date
    07-20-2006
    Posts
    4
    Hey. The picture I drew might not look good, but i applied the formatting to the numbers column. Just highlighted all the numbers instead of the minimum one.

    A column is the names, B column is the numbers

  7. #7
    skatonni via OfficeKB.com
    Guest

    Re: Select Minimum Field

    Seems like something that should work.

    Try Cell Value is equal to =Min(B:B)

    But this affects the entire column.

    Visor wrote:
    >Hey. The picture I drew might not look good, but i applied the
    >formatting to the numbers column. Just highlighted all the numbers
    >instead of the minimum one.
    >
    >A column is the names, B column is the numbers
    >


    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...mming/200607/1

  8. #8
    skatonni via OfficeKB.com
    Guest

    Re: Select Minimum Field

    This is the correct format for "Formula is":

    =B1=MIN($B$1:$B$10)

    seems to work


    skatonni wrote:
    >Seems like something that should work.
    >
    >Try Cell Value is equal to =Min(B:B)
    >
    >But this affects the entire column.
    >
    >>Hey. The picture I drew might not look good, but i applied the
    >>formatting to the numbers column. Just highlighted all the numbers
    >>instead of the minimum one.
    >>
    >>A column is the names, B column is the numbers


    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...mming/200607/1


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1