Home > Blockchain >  Minima Elementwise in Excel
Minima Elementwise in Excel

Time:09-28

I have two columns of data: A and B.

I need a column C with elementwise minima between A and B data.

For instance:

enter image description here

If I put in C:

= MIN ($A$1:$A$3; $B$1:$B$3)

Then I get a single number, the minimum of all data (in our case 1).

What can I do?

CodePudding user response:

Can't you just use

=IF(A1:A3<B1:B3,A1:A3,B1:B3)

This will spill all minima when using Microsoft365.

CodePudding user response:

You were almost there.You just need your formula to be =MIN(A1:B1) at row 1 and then drag down.

Notice there are not $ so we are using relative references. That way you can get minimun value between A and B values at same row, not all values.

enter image description here

CodePudding user response:

In cell C1, you put following formula:

=MIN(A1;B1)

You select cell C1, you put your mouse-cursor in the right-bottom part of cell C1 until the cursor changes in a small cross, you start dragging and you drop once cell C3 is filled.

You will see following formula:

In cell C2:

=MIN(A2; B2)

In cell C3:

=MIN(A3; B3)

As you see, there's no need to use absolute references (the ones with the dollarsigns) you're using.

  • Related