Comparing two excel sheets and finding max value AND copying neighbor cell -


i have 2 sheets, similar formatting different values.

here's example (real spreadsheet of course has more values)

sheet 1

temp | year 89 | 1979

sheet 2

temp | year 77 | 1998

i want compare temp values , put highest value in 3rd sheet, , copy neighboring year value neighboring cell in 3rd sheet. have result in 3rd sheet using formula: =max(sheet1!b4,sheet2!b4) is:

89

but i'd (by referencing value in next column , placing in next column on 3rd sheet):

89 | 1979

does have idea how this?

thanks time,

s

i suggest like:

=iif(sheet1!b4 = max(sheet1!b4, sheet2!b4), sheet1!c4, sheet2!c4)

but have issue if max value same both. of course can account if possibility , problem.

actually, not efficient way of doing this. better:

=iif(sheet1!b4 > sheet2!b4, sheet1!c4, sheet2!c4)

and heck, if need have both c column values when b columns equal, this:

=iif(sheet1!b4 > sheet2!b4, sheet1!c4, iif(sheet1!b4 = sheet2!b4, sheet1!c4 & ", "& sheet2!c4, sheet2!c4))


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -