Formula to smooth/sort values over LinkID_SecrionID range

longbow2000

Board Regular
Joined
May 5, 2004
Messages
59
Office Version
  1. 365
Platform
  1. Windows
Good Day

I am looking for a formula to smooth and sort values for the LinkID_SecrionID range from biggest to lowest values, or lowest to biggest, depending on if max is in lower order of the range.

As per the inserted Mini Sheet, you have the following:

  • LinkID and Section ID column
  • Value assigned to each unique LinkID_SectionID
  • Some LinkID_SectionID are repeated, but not always
The aim:

Based on the LinkID part, I aim to smooth the values, but in equal increments between the # of unique LinkID_SectionID. If the LinkID_SectionID is repeated, then the same value must apply.

My manual input is shown in the Mini Sheet, with my “side-line calculations”

Thanks in advance

Mr_Excel.xlsx
ABCDEF
1LinkID_SectionIDValueDesired_OutcomeApplicable to LinkID: D1088 (Range A2:B10)
2D1088_010353678Max678
3D1088_020678506Min163
4D1088_030546335Diff515
5D1088_030546335Count Unique # LinkID_SectionID range4
6D1088_030546335Increment172
7D1088_030546335smooth/sorted values
8D1088_030546335Max678
9D1088_030546335Smoothed value 1506
10D1088_040163163Smoothed value 2 (will be repeated for D1088_030)335
11D1080_0105555Min163
12D1080_0105555
13D1080_0204242Range(A11:B13) no change, only 2 unique values
14D1083_010128128Range(A14:B19) no change, only 2 unique values
15D1083_010128128
16D1083_010128128
17D1083_010128128
18D1083_010128128
19D1083_0205959
20D109_01036444081Applicable to LinkID: D109 (Range A20:B32)
21D109_02032853631Max4081
22D109_03040813182Min34
23D109_04033182732Diff4047
24D109_05016972282Count Unique # LinkID_SectionID range10
25D109_06019761833Increment450
26D109_06520621383smooth/sorted values
27D109_0701414933Max4081
28D109_0701414933Smoothed value 13631
29D109_0701414933Smoothed value 23182
30D109_08034484Smoothed value 32732
31D109_08034484Smoothed value 42282
32D109_09032434Smoothed value 51833
33P28/5_01065446544Smoothed value 61383
34P28/5_0151039713065Smoothed value 7 (will be repeated D109_070)933
35P28/5_0151039713065Smoothed value 8 (will be repeated for D109_080)484
36P28/5_0151039713065Min34
37P28/5_0151039713065
38P28/5_0201442719587
39P28/5_0201442719587
40P28/5_0201442719587Applicable to LinkID: P28/5 (Range A33:B63)
41P28/5_0201442719587Max32629
42P28/5_0201442719587Min6544
43P28/5_0201442719587Diff26085
44P28/5_0201442719587Count Unique # LinkID_SectionID range5
45P28/5_0201442719587Increment6521
46P28/5_0201442719587smooth/sorted values
47P28/5_0201442719587Min6544
48P28/5_0251296426108Smoothed value 113065
49P28/5_0251296426108Smoothed value 2 (will be repeated for P28/5_015)19587
50P28/5_0251296426108Smoothed value 3 (will be repeated for P28/5_020)26108
51P28/5_0251296426108Max (will be repeated for P28/5_030)32629
52P28/5_0303262932629Note: Max value in lower part of range, sort from min to max
53P28/5_0303262932629
54P28/5_0303262932629
55P28/5_0303262932629
56P28/5_0303262932629
57P28/5_0303262932629
58P28/5_0303262932629
59P28/5_0303262932629
60P28/5_0303262932629
61P28/5_0303262932629
62P28/5_0303262932629
63P28/5_0303262932629
64etc. to end as data set has a total of 210 different LinkIDs
Sheet2
Cell Formulas
RangeFormula
F2F2=MAX(B1:B10)
F3F3=MIN(B2:B10)
F4,F43,F23F4=F2-F3
F5F5=SUM(IF(A2:A10<>"",1/COUNTIF(A2:A10, A2:A10), 0))
F6,F45,F25F6=F4/(F5-1)
C2:C4,C28,C43C2=F8
C5,C29:C30,C44C5=F10
C6,C31:C32,C45C6=F10
C7,C46C7=F10
C8,C47:C48C8=F10
C9:C10,C49C9=F10
F9:F11F9=F8-$F$6
F21F21=MAX(B20:B32)
F22F22=MIN(B20:B32)
F24F24=SUM(IF(A20:A32<>"",1/COUNTIF(A20:A32, A20:A32), 0))
F28:F36F28=F27-$F$25
F41F41=MAX(B33:B63)
F42F42=MIN(B33:B63)
F44F44=SUM(IF(A33:A63<>"",1/COUNTIF(A33:A63, A33:A63), 0))
F47F47=F42
F48:F51F48=F47+$F$45
C20:C27,C42C20=F27
C33:C34C33=F47
C35C35=F48
C36C36=F48
C37:C38C37=F48
C39C39=F49
C40C40=F49
C41C41=F49
C50C50=F50
C51:C52C51=F50
C53C53=F51
C54C54=F51
C55C55=F51
C56C56=F51
C57C57=F51
C58C58=F51
C59C59=F51
C60C60=F51
C61C61=F51
C62C62=F51
C63C63=F51
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Good Day

As a follow-up to my previous query, I must admit with the latest Excel 365 builds (ver.2208) a lot of new formulas came into play, and I don’t know them all yet.

However, if it will be easier smoothing and ordering the values vua VBA, your input will also help ‘n great deal.

Thanks in advance
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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