Re-ordering Array Values

Walks

New Member
Joined
Jan 25, 2021
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
Hi,

I was given an excel sheet that pulls data from historian. It has several rows of device data that is currently ordered by some type of ranking system. I now need to order it by device number (smallest to largest) but whenever I try to do that I get an error saying "You cannot change part of an array".

There are 2 sheets being used. The main sheet contains the actual values in a table that is ordered by the priority of the device the value is assigned too. The second sheet contains the tag names of the data that will be pulled from Historian. The second sheet has all the devices listed in numerical order which is how I want them. I was assuming there might be some VBA code being ran to order the devices and values by a ranking system but I didn't see anything.

I've tried several methods of sorting the items but it won't work.

Workbook_Example1.xlsm
CDE
2DevicesMAXValues
3A-171,177950
4A-051,298960
5A-141,1761080
6A-411,1480
7A-03945150
8A-021,004700
9A-441,155710
10A-651,090900
11A-71940620
12A-421,0590
13A-181,388520
14A-671,094800
15A-221,088680
16A-66904325
17A-191,2891175
18A-371,29975
19A-121,470Null
20A-261,406810
21A-351,026480
22A-481,280560
23A-711,176950
Ellen Inj Report
Cell Formulas
RangeFormula
E3:E22E3='C:\Program Files (x86)\Common Files\ArchestrA\HistClient.xlam'!wwAnalogLive1("BETA-HIST2", 'Ellen w tags'!$E$3:$E$23,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE)
E23E23='C:\Program Files (x86)\Common Files\ArchestrA\HistClient.xlam'!wwAnalogLive1("BETA-HIST2", 'Ellen w tags'!$E$3:$E$23,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE)
Press CTRL+SHIFT+ENTER to enter array formulas.


Workbook_Example1.xlsm
CDE
2WellMax Allowable Surface Inj Pressure (PSI)Current Tbg Pressure (PSI)
3A-021,177EL_40_I_A_02.Tubing_Pressure
4A-031,298EL_40_I_A_03.Tubing_Pressure
5A-051,176EL_40_I_A_05.Tubing_Pressure
6A-121,148EL_40_I_A_12.Tubing_Pressure
7A-14945EL_40_I_A_14.Tubing_Pressure
8A-171,004EL_40_I_A_17.Tubing_Pressure
9A-181,155EL_40_I_A_18.Tubing_Pressure
10A-191,090EL_40_I_A_19.Tubing_Pressure
11A-22940EL_40_I_A_22.Tubing_Pressure
12A-261,059EL_40_I_A_26.Tubing_Pressure
13A-351,388EL_40_I_A_35.Tubing_Pressure
14A-371,094EL_40_I_A_37.Tubing_Pressure
15A-411,088EL_40_I_A_41.Tubing_Pressure
16A-42904EL_40_I_A_42.Tubing_Pressure
17A-441,289EL_40_I_A_44.Tubing_Pressure
18A-481,299EL_40_I_A_48.Tubing_Pressure
19A-631,470EL_40_I_A_63.Tubing_Pressure
20A-651,406EL_40_I_A_65.Tubing_Pressure
21A-661,026EL_40_I_A_66.Tubing_Pressure
22A-671,280EL_40_I_A_67.Tubing_Pressure
23A-711,176EL_40_I_A_71.Tubing_Pressure
Ellen w tags
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I just noticed that in the first sheet I had already re-ordered the "Max" values to how they should be, you can disregard that column entirely, they are static values. Its the "Values" column I'm trying to figure out. The "Values" column should correspond to the Current Tbg Pressure Column in the second sheet. Some how the values are getting re-arranged. I've tried renaming the devices in numerical order on the first sheet but that didn't work.

Thank you for any help!
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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