+ Reply to Thread
Results 1 to 22 of 22

Conditional formatting - highlighting lowest value per row

  1. #1
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Conditional formatting - highlighting lowest value per row

    Hi,

    I have made a price comparison table.

    It is set out as follows

    B = price , C= supplier, code D = price, E = supplier, code F = Price, H = supplier code, J = Price, K, Supplier code, L = Price, M = supplier code, N = price, O = Supplier code.

    Each row is a product, so I am trying to compare each suppliers price (B,D,F,H,J,L,N) per row and highlight the cheapest price.

    Whenever I get it to work it looks for the cheapest price in the entire table rather than on a row by row basis.

    Would really appreciate a nudge in the right direction.

    Thanks in advance

    Sam

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    you should be able to use MIN
    Assuming starts in row 3

    =MIN( $B2, $D2, $F2, $H2, $J2, $L2, $N2)

    and apply to the range $B, $D, $F, $H, $J, $L, $N

    can you post a sample spreadsheet
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Conditional formatting - highlighting lowest value per row

    Quote Originally Posted by etaf View Post
    you should be able to use MIN
    Assuming starts in row 3

    =MIN( $B2, $D2, $F2, $H2, $J2, $L2, $N2)
    You need to compare the individual cell value to the range values:

    =B2=Min(...)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Conditional formatting - highlighting lowest value per row

    What do the supplier codes look like? Are they numbers or text?

  5. #5
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    Hi all,

    Sorry I didn't get email of a reply!

    The product codes vary from the supplier's some are all number some are mixed number and letters etc

  6. #6
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    Here is an example of my worksheet.

    Thanks in advance
    Attached Files Attached Files

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    Quote Originally Posted by Tony Valko View Post
    You need to compare the individual cell value to the range values:

    =B2=Min(...)
    Dah!! I was in the process of typing that out and for some reason , just posted the MIN value !!!!
    thanks for pointing that out

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    =if(b3<>"",b3=min( $b3, $d3, $f3, $h3, $j3, $l3, $n3))

    Works on your sheet, rather than a logical function - strange

    Is that the result

    Do the products in row A have any relevance to the result you want ?
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    Hi,

    Thanks for that.

    It's worked in some but not in other for some very strange reason.

    For example, in one product line a more expensive item is highlighted.

    Some rows are empty, and column B has been highlighted in every one, although i'm not to worried about that.

    In another there are 3 values £70, £80 and NA and NA has been highlighted dispite this not being apparent in other rows where it is working correctly.

    Products in A have no relevance other than me knowing what it is I am looking at.

    Thanks for your time, much appreciated.

    Any ideas?

  10. #10
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    Ahh just realised for some reason when I paste it across to my working version it changed the formula to row 5 instead. Seems to be working perfectly now!

  11. #11
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    That's great thanks, I've tested it and it works perfectly.

    Now this may not be possible, but from this data ideally I would like to be able to create another table on a new sheet (same workbook) and to be able to pick out the cheapest prices for each particular item and its associated supplier?

    Do you think this is possible or will I need to do this manually?

    Thanks again

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    where is supplier in column N and O its the next column along
    but in other columns it shows a partnumber title

    this will find the minimum value and return the value in the next column to the right of the minimum value
    =CELL("contents",INDIRECT(ADDRESS(ROW(),MATCH(MIN(A3:O3),A3:O3,0)+1)))

  13. #13
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    Hi,

    It's probably easier to ignore this column for a minute as I can see if causing problems with this formula.

    I'm sorry I can't get the above formula to work, its coming up with a #REF error.

  14. #14
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    see formula attached - column Q
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    Hi,

    That works for the part number and price thanks!

    Any way to get the suppliers name in there somehow as well?

    Thanks again, really appreciate your help.

  16. #16
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    I cannot see more than 1 supplier
    as asked
    where is supplier in column N and O its the next column along
    but in other columns it shows a partnumber title
    if you are pulling from every row - then you can just do =O3
    and copy down
    Last edited by etaf; 04-06-2014 at 03:53 PM.

  17. #17
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    Sorry, missed that.

    they are B1,D1,F1,H1,J1,L1,N1

    Basically the idea with column N was to have the suppliers name in the part number column so that it could be universal for suppliers who I only source a few products from, but I will be changing this.

    Thanks agian

  18. #18
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    thanks

    try this

    =CELL("contents",INDIRECT(ADDRESS(1,MATCH(MIN(A3:O3),A3:O3,0))))

  19. #19
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    That's worked perfectly thanks!

    Just 1 thing, sorry. In rows where they are blank I get a #NA error, can this be blank if there is no data?

    Thanks again

  20. #20
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    yes, you can use iferror


    =IFERROR( CELL("contents",INDIRECT(ADDRESS(1,MATCH(MIN(A3:O3),A3:O3,0)))) , "")

  21. #21
    Forum Contributor
    Join Date
    01-12-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2016
    Posts
    152

    Re: Conditional formatting - highlighting lowest value per row

    That's perfect, thanks very much for all your help!

  22. #22
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: Conditional formatting - highlighting lowest value per row

    your welcome, thanks for the rep

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 02-16-2013, 07:29 AM
  2. Conditional Formatting Lowest Value of Duplicates
    By n3sky in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-21-2011, 05:48 PM
  3. Conditional Formatting: Highlight the lowest value
    By Hypnopoison in forum Excel General
    Replies: 7
    Last Post: 11-27-2010, 08:48 AM
  4. Conditional Formatting lowest # if it only appears once
    By dlvgolf in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-06-2005, 12:05 PM
  5. Conditional formatting and row highlighting
    By Cary in forum Excel General
    Replies: 3
    Last Post: 06-03-2005, 12:05 PM

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