SuGo
SuGo

Reputation: 139

Select from two columns maximum values

I have two columns of data in Excel:

30796.03 50779.57
17220    19315.76
57891.   77629.74
2046.2   3306.86
21883        NULL
740607       NULL
540000   740988
180      297.03
25200    34110.72
74793.79    NULL
4800     7981.44
21600    35935.92
3840     6468.67
27000    4 093.05
636      1061.74

For column 2, if it DIFFERS from column 1, I want to replace column 1 with that different column 2 value.

If column 2 show's NULL, then keep column 1 as is.

Upvotes: 1

Views: 38

Answers (1)

pnuts
pnuts

Reputation: 59495

In a separate column please try:

=IF(B1="NULL",A1,B1)  

copied down to suit.

If the next to last entry under B is a typo you might be able to use:

=MAX(A1,B1)  

but this assumes ColumnB is either NULL or always more than the corresponding ColumnA value.

Upvotes: 1

Related Questions