How to synchronize helper cells with the table they help?

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,532
Office Version
  1. 365
Platform
  1. Windows
I am working on a macro that will calculate the weighted ratings for a collection of products. Each product is given a "raw" rating on a number of features or properties. The macro will convert the raw ratings into Z Scores, apply a weighting factor, and then add them. The raw ratings are in a worksheet table. In addition to that, the macro needs two additional parameters for each property: the weighting factor and the order. The order indicates whether the ratings are HiLo (higher values are better) or LoHi (lower values are better).

Here's an example of 4 properties for electric vehicles:

Weighted Ratings.xlsm
BCDEFG
7OrderLoHiHiLoLoHiHiLo
8Weight1221
9CarWtdRtgPriceRangeAvailHeadroom
10A?$34K300 mi0 mo5 in
11B?$54K320 mi3 mo3 in
12C?$63K350 mi9 mo7 in
13D?$76K420 mi0 mo8 in
WtdRtg


The table (B9:G13) handles the properties nicely. In this example, the two helper rows containing the Weight and Order parameters are outside the table in rows 7 & 8. This works until I add, delete, or move a column in the table. The table columns all adjust automatically, but the helper rows do not. So I have to be careful to keep them in sync. That is a nuisance and error prone.

The other option I thought of is to move the two helper rows inside the table. That will keep them in sync, but it causes other problems, such as sorting.

Weighted Ratings.xlsm
BCDEFG
7CarWtdRtgPriceRangeAvailHeadroom
8OrderLoHiHiLoLoHiHiLo
9Weight1221
10A?$34K300 mi0 mo5 in
11B?$54K320 mi3 mo3 in
12C?$63K350 mi9 mo7 in
13D?$76K420 mi0 mo8 in
WtdRtg (xx)


Is there a way to handle this that is better than either of these two options?

Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,215,022
Messages
6,122,726
Members
449,093
Latest member
Mnur

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