# MAX/IF function

Options

Hello all,

I am trying to use the MAX/IF logic in smartsheet. It worked for me in excel:

I used the same logic from above in smartsheet:

And I get this:

• ✭✭✭✭✭
Options

Without knowing your sheet to confirm, I think this is the result you're looking for...

=MAX(COLLECT([Column3]1:[Column3]10, [Column2]1:[Column2]10, [Primary Column]@row))

In which case, replace your original formula with this one...

=MAX(COLLECT({Employee Comp by Division and Specialty te Range 3}, {Employee Comp by Division and Specialty te Range 1}, [Primary Column]@row))

Let me know if this works for you.

-Jen

• ✭✭✭✭✭
Options

Hi @Deesa Dontamsetti. Can you provide a screenshot of your columns and one sample row of data, so I can better understand the validity of the formula you've written? Thanks.

-Jen

• ✭✭✭✭✭
Options

Without knowing your sheet to confirm, I think this is the result you're looking for...

=MAX(COLLECT([Column3]1:[Column3]10, [Column2]1:[Column2]10, [Primary Column]@row))

In which case, replace your original formula with this one...

=MAX(COLLECT({Employee Comp by Division and Specialty te Range 3}, {Employee Comp by Division and Specialty te Range 1}, [Primary Column]@row))

Let me know if this works for you.

-Jen

• Options

Thank you so much, Jen! This worked! Truly appreciate your help :). Great example too!

-Deesa

• ✭✭✭✭✭
Options

That's great, @Deesa Dontamsetti.

Also, thank you for your engagement and contribution to our community. Your inquiry is likely to assist other members across time AND it helps me flex my skills.

If you appreciate my response, please recognize the effort by with an "Insightful" or "Vote Up" selection. Thanks!

-Jen

• ✭✭✭✭
Options

Thanks Jen, this also worked for my issue - I appreciate your skills :)

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!