how to check if all prices are the same

bigdan

Well-known Member
Joined
Oct 5, 2009
Messages
840
Office Version
  1. 2013
Platform
  1. Windows
I have 1000 rows of text which includes the Province, weight classes, prices, etc. All the text looks like this:
ON_XY_DOH|PARCEL|30|40.99

<tbody>
</tbody>

In this case the last two numbers are what matter. This means that if shipping weights are up to 30 pounds we charge 40.99

So there's 1000 rows of text like this, so I made a number of mid(x,y,z) statements so that all I have now is 1000 rows of 2 cells, which would say the weight and the shipping cost.

How do I make sure that for every mention of 30 the rate given is 40.99, and same for all the other shipping weights? There's about 50 weight classes, and I want to make sure the rate is the same for each weight class.
 
If you don't want to use a pivot table, here is another way. Each formula copied down.

Excel Workbook
ABCDEF
1WeightPriceWeightCheck
257.493Error
3108.995
434.9910
557.4915Error
6108.99
731.25
834.99
9157.99
10158.99
11
Check Weight & Price (2)
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Thanks!
If you enter these formulas into row 3, how will D4-F4 and D5:D6 get populated the way they seem to be here?

Please see if this is what you are looking for.

Excel 2013/2016
ABCDEF
1WeightPrice
257.493510
357.494.997.498.99
4108.997.497.498.99
534.991.25
637.494.99
7108.99
831.25
934.99

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet5

Array Formulas
CellFormula
D3{=IFERROR(INDEX($B$2:$B$9, SMALL(IF(($D$2=$A$2:$A$9), MATCH(ROW($A$2:$A$9), ROW($A$2:$A$9)), ""),ROWS($A$2:A2))),"")}
E3{=IFERROR(INDEX($B$2:$B$9, SMALL(IF(($E$2=$A$2:$A$9), MATCH(ROW($A$2:$A$9), ROW($A$2:$A$9)), ""),ROWS($A$2:A2))),"")}
F3{=IFERROR(INDEX($B$2:$B$9, SMALL(IF(($F$2=$A$2:$A$9), MATCH(ROW($A$2:$A$9), ROW($A$2:$A$9)), ""),ROWS($A$2:A2))),"")}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
Ahh!! This solved it very well! Thank you Gerald :)

For the pivot table option . . .

Let's say your weight data is called "WEIGHT", and your price data is called "PRICE".

Set up your pivot table as normal, and specify WEIGHT as the first item in the Row Labels box.
Then specify PRICE as the second item in the Row Labels box.

Then view your pivot table, and it will be very obvious that WEIGHT 3 has two entries for PRICE.




<tbody>
</tbody>
 
Upvote 0
Wonderful. Thank you!

Further to Gerald's comments about a pivot table. Here it is for your sample data. Further, you mentioned that the prices ended up being a sum. In the PT below (cols E:F) you will see that I have changed it so that it COUNTS each price. So to confirm what I did
Put Weight then Price into the Rows area and Price also into the Values area and changed the setting in that area to Count, not Sum

Looking at the PT you can easily see that the weight of 3 has two different prices and further, how many of each of those prices there are.

Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

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