Data Validation Formula To Detect If Number Not Nearest 0

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,077
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all...

i'm looking for data weighted with smallest number-nearest number 0 (absolut number)
Excel 2007 32 bit
C
D
E
F
G
3
abctotal
4
data
-2​
4​
1
5
weighted
20%​
30%​
50%
100%​

<tbody>
</tbody>
Sheet: Sheet1

<tbody>
</tbody>

weighted number is given based on the smallest number (nearest number 0)
i need data validation formula to detect if weighted is not true...
the total weighted must 100%
from data 1 (nearest 0), the weighted given must greates number from 3 number -2,4,1

any assistance much appreciated..
m.susanto
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
24741124
50%30%20%
data-2
4
7
41
weighted30%20%#N/A#N/A50%100%
assumed problem statementcol J
find the 3 numbers closest to zero and assign them 50%,30%,20%
formula in C4 (30%)
=OFFSET($I$1,1,MATCH(C1,$J$1:$L$1,0))

<colgroup><col><col><col span="12"></colgroup><tbody>
</tbody>
 
Upvote 0
24741124
50%30%20%
data-24741
weighted30%20%#N/A#N/A50%100%
assumed problem statementcol J
find the 3 numbers closest to zero and assign them 50%,30%,20%
formula in C4 (30%)
=OFFSET($I$1,1,MATCH(C1,$J$1:$L$1,0))

<tbody>
</tbody>

hi...

how to it work...
 
Upvote 0
Rule :

data weighted is given, with not consistent number..
i mean can like example :

20%,10%,70%
50%,20%,30%
40%,40%,20%

but the total must be = 100%

i want to know in Data Validation, how to give weighted number (input manual) not mistake type..
example :

if have 3 data number
7,-5,1---weighted biggest number is given to number 1.
-4,8,10 -- weighted biggest number is given to number 4

if i entry biggest number is wrong, data validation showing/alert information....
 
Last edited:
Upvote 0
i hope this sample make clear...


Excel 2007
CDEFG
16data adata bdata c
175-23
1825%45%30%correct
1910%40%50%not correctshowing error alert in Data Validation
2060%30%10%not correctshowing error alert in Data Validation
Sheet1
 
Upvote 0
how do you determine -2 is 45% and not 40% ?

cause, -2 is nearest zero, and 45% or 40 or etc...is given number not have the rule. The rule, total 3 data must be 100% (25%+45%+30%) etc.....
i just want to know & getting information if i wrong placing in cell, like post #5 above then showing error alert in Data Validation
 
Upvote 0
finding numbers closest to zero is easy, but how do you decide what percentages to apply ?

example - the 3 nearest numbers to zero from 2,7,8,9,-9,-8,7,-1,3,10,12,6 are -1,2,3

tell us how you assign percentages to them.
 
Upvote 0

Forum statistics

Threads
1,215,603
Messages
6,125,788
Members
449,260
Latest member
Mrw1

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