Process Worksheet With Two Formulas

Thomas Scott

New Member
Joined
Nov 7, 2021
Messages
7
Office Version
  1. 2019
Platform
  1. Windows
I want to use 2 formulas (normalization) and binarization on the same worksheet. I tried concatenating them in a single cell and that does not work so I assume a VBA macro is needed. My thinking, as a novice, is that should be something like this:
Sub Binarize ()
’Dimension the range & specify the worksheet for input
’Primary data will be numbers as well as ranged array
’Binarized data will all be integers or numbers without decimal values

‘ Normalize the worksheet
=(Prime2!B2-MIN(Prime2!B:B))/(MAX(Prime2!B:B)-MIN(Prime2!B:B))

’Binarize the normalized array (mean+/- 1SD for unity)
=IF(AND(Prime2!B2<AVERAGE(Prime2!B:B)+STDEV.P(Prime2!B:B),Prime2!B2>AVERAGE(Prime2!B:B)-STDEV.P(Prime2!B:B)),1,0)
End Sub

BUT do not know enough Excel to go any further. Two sample mini-sheets are shown. I can do it with 3 worksheets easily but just want two, i.e., starting and result. Thanks.

Sample.xlsx
ABCD
1IDData1Data2Data3
2Case1323
3Case2123
4Case3123
5Case4311
6Case5111
7Case6311
8Case7211
9Case8231
Prime


Sample.xlsx
ABCD
1IDData1Data2Data3
2Case110.51
3Case200.51
4Case300.51
5Case4100
6Case5000
7Case6100
8Case70.500
9Case80.510
Analysis
Cell Formulas
RangeFormula
B2:D9B2=(Prime!B2-MIN(Prime!B:B))/(MAX(Prime!B:B)-MIN(Prime!B:B))
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I don't think you need VBA, but need some clarifications.
1) There are different definitions of Binarizing. Can you state in words what your definition is?
2) What are you trying to concatenate?

It would be helpful if you could show a manual calculation as an example.
 
Upvote 0

Forum statistics

Threads
1,215,834
Messages
6,127,164
Members
449,368
Latest member
JayHo

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