Formula to show lowest price of heading

Leogarvey98

New Member
Joined
Jul 10, 2002
Messages
9
sorry - bad title (didn't know how to word it), but I really need help with this:

I have a row of prices, each in a column with the heading of the shop the price is from - is there a formula that can automatically show which shop is the cheapest?

here's what I mean:

http://garvey98l.pwp.blueyonder.co.uk/shops.xls

so that in cell I3, it would automatically come up with shop 3, rather than me having to type it.

Any help would be greatly appreciated :)

Leo
 
John,

Alternative procedure for your consideration.

Using Aladin’s raw data, with slight amendments: green cells – lowest prices; orange cells – highest prices.
Cheapest shop when more than one.xls
ABCDEFGHI
1TitleShop1Shop2Shop3Shop4Shop5Shop6
2Item15.993.492.895.993.992.89
3Item23.102.503.923.262.503.04
4Item32.021.812.912.641.811.81
5Item43.773.774.803.404.114.80
6
7
8Pricing:Lowest
9
10No.ofLowest
11TitleStoresPriceShops
12Item122.89Shop3Shop6#N/A#N/A
13Item222.50Shop2Shop5#N/A#N/A
14Item331.81Shop2Shop5Shop6#N/A
15Item413.40Shop4#N/A#N/A#N/A
16
Alternative (2)


B8:
Validation dropdown (Data menu | Validation)
List
Source: “Highest,Lowest” (no quotes)

B12:
=COUNTIF(B2:G2,C12)
Copy down to B15.
(this formula simply notes the number of stores with the min/max price – the formula plays no part in any other formula).

C10:
=IF($B$8="Lowest","Lowest","Highest")

C12:
=IF($B$8="Lowest",MIN(B2:G2),MAX(B2:G2))
Copy down to C15.

D12:
=INDEX($B$1:$G$1,MATCH(1,($B2:$G2=$C12)*(COUNTIF($C12:C12,$B$1:$G$1)= 0),0))
Array entered – i.e. Shift-Ctrl-Enter
Copy to G12.
Then select D12:G12 and copy down to D15:G15.

To eliminate the #NA error message - alternatives:

1. Use conditional formatting (CF):

Select D12
Format menu | Conditional Formatting
Formula is: =ERROR.TYPE(D12)=7
Format: white font
OK

Copy the CF in D12 to E12:G15 and D13:D15 using the Paintbrush tool.

2. Wrap the formula in D12 inside an IF statement:

=IF(ISNA(formula))),"",formula))

i.e.
=IF(ISNA(INDEX($B$1:$G$1,MATCH(1,($B2:$G2=$C18)*(COUNTIF($C18:C18,$B$1:$G$1)=0),0))),"",INDEX($B$1:$G$1,MATCH(1,($B2:$G2=$C18)*(COUNTIF($C18:C18,$B$1:$G$1)=0),0)))

After using the IF statement, you still have to array enter the formula (then copy it to the rest of the range).

Regards,

Mike
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
First of all Thank you for all the help and ideas
I am learning quite a bit from all this. But still I have an issue how to implement those formulas in an data that I get from my vendors(shops) that first some have over 15000 items the only common ID is number and at the same time I get revisions of the pricing every month, I was considering as before to have all data in one sheet but this appears to create a big issue as to manage that data on a month to month basis, I think that if I keep my vendor files separate I can manage them better but then I have lost the way to have a price comparison. Ideally will be to have all those files as they send to me by my vendors and If I need to do a price comparison to to enter an item # or list of items #'s and then get the best pricing in my workbook.

Thank you all and Happy and Healthy New Year
John
 
Upvote 0
Ekim said:
Why, is it any faster?

Why not, is it any slower?
All.xls
ABCDEFGHIJ
1FastExcelWorkBookProfile
2
3WorkBookSummary
4CalcTime(Millisec)%BookMicroSecsRangeTotalTBytes
5FormulaReCalcFullCalcVolatileOvHead/FormulaMem(K)Mem(K)perCell
6Original3770.211.51.9%7.730.4252743.5
7Alternative2410.218.21.1%6.675.3292960.9
8
Sheet1


The original is twice as fast as the alternative, while its volatilty score remains bearable (due to COLUMN() primarily, which is used for robustness). The figures are averages of 8 separate runs. The number items to compute for 29, that of shops 6. If you add either conditional formatting or ISNA as you suggested, the scores for the alternative will worsen.
 
Upvote 0
Still having a few problems with the conditional format. Sometimes it works, sometimes it doesn't. Here is a snap of my page.
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
[/img]
 
Upvote 0

Forum statistics

Threads
1,215,692
Messages
6,126,230
Members
449,303
Latest member
grantrob

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