# Choose max value two different columns.

#### white95gt

##### New Member
Hello,

i have a series of calculations in two columns running side by side. Sometimes i do not require both columns, sometimes it is required.

towards the end of the calculations i need to merge the two columns and choose the cell with the largest value to continue the final calculations. Also if i do not use the second column, I end up with #DIV/0! as a result and cannot figure out the formula to choose the higher cell value between them.

I tried important a clip of excell, so i made the simple table below to emulate an excell sheet. lets pretend answer 1 is cell:A1.

 answer 1 answer 2 150 #DIV/0! (max value) the max value between the two columns

<TBODY>
</TBODY>

### Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

#### vds1

##### Well-known Member
suppose you want to find largest value in column A and C

=MAX(A:A,C:C)

#### white95gt

##### New Member
Equation would work if both columns had actual #'s, however sometimes i have the error message and the calculation you provided will not work.

Last edited:

#### vds1

##### Well-known Member
You have to provide the range.

=Max(A2:A54,C2:C54)

#### white95gt

##### New Member
It still will not operate with the #DIV/0! answer in one column, ive even tried iferror but i can not figure this one out.

#### vds1

##### Well-known Member
One more option would be to use AGGREGATE

=AGGREGATE(4,6,A2:A54,C2:C54)

#### white95gt

##### New Member
VDS1 thank you very much, that works perfectly.

#### vds1

##### Well-known Member
Thanks for your response. In the above formula 4 is for MAX function and 6 is for ignore error values.

#### white95gt

##### New Member
As i went through the formula, step by step and broke it down, i was able to understand the 4 and the 6, works perfectly.

Replies
2
Views
423
Replies
0
Views
1K
Replies
6
Views
237
Replies
13
Views
2K
Replies
6
Views
1K

1,190,647
Messages
5,982,116
Members
439,756
Latest member
alice128

### 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.

### Which adblocker are you using?

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

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