Forum Discussion

lin123's avatar
lin123
Copper Contributor
Nov 29, 2024

Help needed with calculated column

I am trying to add a calculated column in Microsoft Lists that follows this logic:

  • If the value in Column A is equal to "Yes," the calculated column should take the value from Column B and subtract 16 from it.
  • If the value in Column A is not "Yes," the calculated column should remain empty.

The formula I have attempted to use is:

=IF([Column A]="Yes", [Column B] - 16, "")

Here:

  • Column A: A column of type Choice or Text, where the value "Yes" can occur.
  • Column B: A column of type Number.
  • The formula is being added as a calculated column.

Issue:
The formula does not seem to work as expected. Even when the value in Column A is "Yes," the calculated column remains empty.

Questions:

  1. Is the above formula supported in Microsoft Lists?
  2. Are there limitations in Microsoft Lists for using this logic or syntax in calculated columns?
  3. Is there a specific reason why this formula might not work (e.g., type settings or handling empty values)?

I would appreciate your guidance on how to correct or adjust this formula to achieve the desired result.

  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    I had no issues with =IF(Adjust="Yes",InStock-16,"")

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

    • Sigi7's avatar
      Sigi7
      Brass Contributor

      Rob_Elliott 

      odd, I would have thought that the comparison operator has to be "==" !?

      BR, Sigi

Resources