Forum Discussion

Tom898's avatar
Tom898
Copper Contributor
Jun 26, 2024
Solved

List with calculated column based on data in row?

Hi,  So I have a SharePoint list which has: A product column with lets say 5 different products, so 5 different rows. Then two columns which are for August and July (I have all the months but tryi...
  • ganeshsanap's avatar
    Jun 27, 2024

    Tom898 Try using calculated column formula like: 

     

    =IF(OR([Product]="Product 1",[Product]="Product 2",[Product]="Product 3"),([AUG]-[JUL])/30,([AUG]-[JUL])/45)

     

    OR 

     

    =IF(OR([Product]="Product 1",[Product]="Product 2",[Product]="Product 3"),([AUG]-[JUL])/30,IF(OR([Product]="Product 4",[Product]="Product 5"),([AUG]-[JUL])/45,""))

     

    Note:

    1. Sometimes comma( , ) does not work in formula (it is based on language or regional settings of your SharePoint site). So in that case use semicolon( ; ) instead of comma( , ).
    2. Use correct display name of your SharePoint columns in above formula.
    3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name].

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources