I need help

D

dangnguyenduc

I have a excel worksheet with two columns of numeric data (A, B). Now o
the column C, I want to compute numbers which follows the followin
rule:
Di = MIN(ABS(Bi-A1), ABS(Bi-A2),...,ABS(Bi-An))
where n is the number of values on column A. Please help me to write
function for this column.

Thank you very much
 
F

Frank Kabel

Hi
in C1 enter the array formula (entered with CTRL+SHIFT+ENTER):
=MIN(ABS(B1-$A$1:$A$20))
and copy down
 
D

dangnguyenduc

Thank you very much for your reply. However, it did not seem to work fo
me. The function ABS(B1-$A$1:$A$20) seemed only to return one value
i.e., ABS(B1-A1).

Am I missing something?

Duc

PS: I pressed Ctrl+Shift+Enter, but nothing showed up
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top