Forum Discussion

dmann1's avatar
dmann1
Copper Contributor
Jan 07, 2026

Conditional formatting in SharePoint lists using JSON

I have my conditional formatting working if I only refer to one number. As can be seen in the image below if the cell I want to format has the number "1" in it the formatting works.

 

I would like the same formatting to work if for example the number was less than "2" or between 3 and 5. I've tried several options with starting with "=if...", but it either breaks the conditional formatting or doesn't make a change. I have been able to find an example that matches the attributes.

Full disclosure the conditional formatting continues so I can apply different colors to other individual numbers. I'm hoping the if I resolve on the set of numbers the others will follow the same framework.

 

3 Replies

  • I recalled SharePoint JSON column formatting doesn’t use Excel-style =IF() syntax. Instead, it relies on expression objects with operator and operands.

    • Rob_Elliott's avatar
      Rob_Elliott
      Silver Contributor

      Kidd_Ip​ not so. I have answered this on his duplicate post here and used if() syntax.

      Rob
      Los Gallardos
      Principal Consultant, Power Platform, WSP Global (and classic 1967 Morris Traveller driver)

      • dmann1's avatar
        dmann1
        Copper Contributor

        Sorry for the double post. I had looked for the first post and could not find it. I will comment on the other post.

Resources