Conditional formula to show cheaper price

dpbarry

Board Regular
Joined
Feb 10, 2003
Messages
214
Office Version
  1. 2016
Platform
  1. Windows
Hi all..

I'm looking at trying to set up a spreadsheet that will compare prices between 3 computer suppliers. (all supplier calculation on same spreadsheet)

Basically, what I want it to do is, after I enter in the prices for a product into each suppliers column, I want to change the colour of the cell (to red) that has the cheapest price for that particular product so that I can see what I have to order from each supplier that has the best price.

Is that possible?

Regards

Declan Barry :o
 
Still having a few problems. Here is a snap of my spreadsheet.

I just need to compare the price between each supplier and hilight cheapest
Toner Cartridges.xls
EFGHIJKLM
2SuppliesTeamMicrowarehouseCanon
3PriceQuantitySub-TotalPriceQuantitySub-TotalPriceQuantitySub-Total
436.18272.3623.00246.0075.102150.20
552.522105.0412.00224.000.0020.00
652.512105.020.0020.0020.00
752.512105.020.0020.0020.00
Sheet1
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello,

I think I may have cracked it using CONDITIONAL FORMATTING

If values are in A1, B1 and C1

The condition is

CELL VALUE IS equal to =IF($A1=0,MIN($B1:$C1),IF($B1=0,MIN($A1,$C1),IF($C1=0,MIN($A1:$B1),MIN($A1:$C1))))

use the format painter to format other cells.


:banghead:
 
Upvote 0
Hi onlyadrafter.

The spreadsheet is as above (using PRICE as the conditional values)

Regards

Declan
 
Upvote 0
Hello,

In that case

change A1 to E5, B1 to H4 and C1 to K4, and put this condition in cell E4, use the format painter to format cells H4 and K4 then format the other rows.

Here, I've done it for you and made some other changes i.e. : to ,

=IF($E4=0,MIN($H4,$K4),IF($H4=0,MIN($E4,$K4),IF($K4=0,MIN($E4,$H4),MIN($E4,$H4,$K4))))

Working OK?
 
Upvote 0
I must be thick cus I can't get it to work. I've changed the layout slightly to make things more clearer.

Hope this helps with setting up the conditional formatting.

Is ther a way of filling down the conditional formatting?

Regards

Declan
Toner Cartridges Master.xls
ABCDEFG
2Supplies TeamMicro warehouseCanon
3DescriptionColourOrderCodeYieldPricePricePrice
4HP4500BlackC4191A35.0045.0075.10
5CyanC4192A52.5212.0020.00
6YellowC4193A52.510.000.00
7MagentaC4194A52.510.000.00
8HP4100BlackC801610k51.810.000.00
9HP4000BlackC8061X10k51.810.000.00
10HP4050BlackC4127X10k51.810.000.00
11HP2100BlackC4127X10k40.710.000.00
12HP5MP/6MPBlackC3903A35.890.000.00
Sheet1
 
Upvote 0
dpbarry said:
I must be thick cus I can't get it to work. I've changed the layout slightly to make things more clearer.

Hope this helps with setting up the conditional formatting.

Is ther a way of filling down the conditional formatting?...

Remove the coloring in E3:G12 first.

Select E4:G12.
Activate Format|Conditional Formatting.
Choose Formula Is for Condition 1.
Enter the following in the white box:

=E4=SMALL($E4:$G4,COUNTIF($E4:$G4,0)+1)

Activate the Format button.
Choose a color from the Patterns tab.
Click OK, OK.
 
Upvote 0
Clever! Aladin,

But how can you do it on non- contiguous ranges as was put at first??

Regards,

Eli
 
Upvote 0
eliW said:
...

But how can you do it on non- contiguous ranges as was put at first??...

Exploit the regularity of spacing between the price columns in order to compute the non-zero minimum price per row in an additional column...
Book2
ABCDEFGHIJ
1
2SuppliesTeamMicrowarehouseCanon
3PriceQuantitySub-TotalPriceQuantitySub-TotalPriceQuantitySub-TotalMinPrice
436.18223275.1223
552.5221220212
652.51202252.51
752.51202252.51
8
Sheet2


The formula in J4, which is copied down, is:

=MIN(IF((MOD(COLUMN(A4:I4)-CELL("Col",A4)+0,3)=0)*A4:I4,A4:I4))

which must be confirmed with control+shift+enter instead of just with enter.

Now select the ranges of interest one by one and use a formula for example for the A-range...

=A4=$J4

and so on for the other price ranges.
 
Upvote 0
Hi Aladin

Many many thanks to one and all for the input. All is now working fine.

To Aladin..

Could you explain in laymans terms, what exactly the conditional formatting equation is doing. I don't fully understand it. All I know is, it works but would like to know a bit more about what it is doing

Just as a matter of interest, is there a way of now getting it to multiply a quantity by the cheapest price?

Regards

Declan
 
Upvote 0
Hi Aladin

Many many thanks to one and all for the input. All is now working fine.

To Aladin..

Could you explain in laymans terms, what exactly the conditional formatting equation is doing. I don't fully understand it. All I know is, it works but would like to know a bit more about what it is doing

Just as a matter of interest, is there a way of now getting it to multiply a quantity by the cheapest price?

Regards

Declan
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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