Forum Discussion

lorg76's avatar
lorg76
Copper Contributor
Oct 25, 2023

Same Row Identifier, different values need to assign to a value

Hi All

 

I hope you can help, I have a list of orders with order lines that have different amounts and I need to assign the whole order to a specific value depending on the highest amount. Example below, please let me know if there is a simple formula to achieve this.

 

Thanks

Order # Order Line #ValueRange 40 / 50 / 50
123123-11040
123123-22040
123123-43040
456456-11060
456456-22060
456456-36060
789789-15050
789789-24050
789789-34050
  • lorg76 

    =MAX(IF($A$2:$A$10=A2,$C$2:$C$10))

    I'd create a helper column which returns the highest value for each order. This formula is in cell E2 and filled down. Enter the formula with ctrl+shift+enter if you don't work with Office 365 or Excel for the web or Excel 2021.

    =IF(E2<=40,40,IF(E2<=50,50,IF(E2<=60,60,"")))

    Then you can use this formula to return the range. The formula is in cell F2 and filled down. The formula uses the result of the helper column E.

  • lorg76 

    =MAX(IF($A$2:$A$10=A2,$C$2:$C$10))

    I'd create a helper column which returns the highest value for each order. This formula is in cell E2 and filled down. Enter the formula with ctrl+shift+enter if you don't work with Office 365 or Excel for the web or Excel 2021.

    =IF(E2<=40,40,IF(E2<=50,50,IF(E2<=60,60,"")))

    Then you can use this formula to return the range. The formula is in cell F2 and filled down. The formula uses the result of the helper column E.

    • lorg76's avatar
      lorg76
      Copper Contributor
      That worked perfectly, thank you so much

Resources