---
title: IF Operation
description: How to use the IF operation in formulas
---

[Skip to content](https://help.plytix.com/en/operations/if#main-content)

English

Show submenu for translations

![Plytix Logo](https://help.plytix.com/hs-fs/hubfs/4%20-%20Plytix%20Logo/Plytix-Logotype.png?width=150&height=61&name=Plytix-Logotype.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Talk to a specialist](https://www.plytix.com/get-started/explorer-call/)

[Talk to a specialist](https://www.plytix.com/get-started/explorer-call/)

 Hello! What can we help you with?

- There are no suggestions because the search field is empty.

1. [Help Center](https://help.plytix.com/en)
2. [Operations](https://help.plytix.com/en/operations)
3. [Logical](https://help.plytix.com/en/operations#logical)

# IF Operation

## How to use the IF operation in formulas

[Definition](https://help.plytix.com/en/operations/if#defintion)

[Example](https://help.plytix.com/en/operations/if#Example)

[Syntax Guide](https://help.plytix.com/en/operations/if#syntax)

[Formula in Use](https://help.plytix.com/en/operations/if#use)

### Definition

The IF operation returns a value based on a set of conditions.

---

### Example

IF(EQ(1, 1), "equal", "different")

Result:   
equal

---

### Syntax Guide

IF(logical\_expression, value\_if\_true, value\_if\_false)

logical\_expression - An expression that represents some logical value, i.e. TRUE or FALSE

value\_if\_true - The value the function returns if logical\_expression is TRUE

value\_if\_false - \[ OPTIONAL - blank by default \] - The value the function returns if logical\_expression is FALSE

---

### Formulas In Use

#### Conditional Brand Insertion

Searches a string and checks if it contains the value from another attribute. If it does, then it returns the original string, if it doesn't it concatenates it with the value from the second attribute.

**Example:**

If brand is "Nitro" and the description is "Snowboard for kids" it will insert in in front of the description so it becomes "Nitro snowboard for kids"

If the brand is "Nitro" and the description is "Snowboard for kids from Nitro" it will do nothing and use the description as it is (because it already contains the word "Nitro").

**Formula:**

IF(GT(SEARCH($ATT.BRAND,$ATT.DESCRIPTION),0),$ATT.DESCRIPTION,CONCAT($ATT.BRAND," ",$ATT.DESCRIPTION))

 

---

### What's Next

- Learn more about[how to write formulas](https://help.plytix.com/formula-cheat-sheet-and-guide)
- Check out the [IFBLANK operation](https://help.plytix.com/operations/ifblank)
- Check out the [IFNULL operation](https://help.plytix.com/operations/ifnull)

---

 

 

- [Getting Started](https://help.plytix.com/en/getting-started#main-content)

    - [Import data](https://help.plytix.com/en/getting-started#import-data)
    - [Attributes](https://help.plytix.com/en/getting-started#attributes)
- [Using Plytix](https://help.plytix.com/en/using-plytix#main-content)

    - [Product Overview](https://help.plytix.com/en/using-plytix#product-overview)
    - [Product Editing](https://help.plytix.com/en/using-plytix#product-editing)
    - [Attributes](https://help.plytix.com/en/using-plytix#attributes)
    - [Product Lists](https://help.plytix.com/en/using-plytix#product-lists)
    - [Relationships](https://help.plytix.com/en/using-plytix#relationships)
    - [Asset Management](https://help.plytix.com/en/using-plytix#asset-management)
    - [Settings](https://help.plytix.com/en/using-plytix#settings)
    - [Product Families](https://help.plytix.com/en/using-plytix#product-families)
- [Sharing your data](https://help.plytix.com/en/sharing-your-data#main-content)

    - [Exports](https://help.plytix.com/en/sharing-your-data#exports)
    - [Webhooks](https://help.plytix.com/en/sharing-your-data#webhooks)
    - [Brand Portals](https://help.plytix.com/en/sharing-your-data#brand-portals)
    - [Channels](https://help.plytix.com/en/sharing-your-data#channels)
    - [Shopify](https://help.plytix.com/en/sharing-your-data#shopify)
    - [BigCommerce](https://help.plytix.com/en/sharing-your-data#bigcommerce)
    - [Syndication Guides](https://help.plytix.com/en/sharing-your-data#syndication-guides)
    - [Shopping Search Engines](https://help.plytix.com/en/sharing-your-data#shopping-search-engines)
    - [Ecommerce Platforms](https://help.plytix.com/en/sharing-your-data#ecommerce-platforms)
    - [Marketplaces](https://help.plytix.com/en/sharing-your-data#marketplaces)
    - [Feed Management Tools](https://help.plytix.com/en/sharing-your-data#feed-management-tools)
- [Admin](https://help.plytix.com/en/admin#main-content)

    - [General](https://help.plytix.com/en/admin#general)
    - [Billing](https://help.plytix.com/en/admin#billing)
    - [Team Roles](https://help.plytix.com/en/admin#team-roles)
- [Operations](https://help.plytix.com/en/operations#main-content)

    - [Date](https://help.plytix.com/en/operations#date)
    - [Info](https://help.plytix.com/en/operations#info)
    - [Logical](https://help.plytix.com/en/operations#logical)
    - [Lookup](https://help.plytix.com/en/operations#lookup)
    - [Math](https://help.plytix.com/en/operations#math)
    - [Operator](https://help.plytix.com/en/operations#operator)
    - [Statistical](https://help.plytix.com/en/operations#statistical)
    - [Text](https://help.plytix.com/en/operations#text)
- [Troubleshooting and FAQ](https://help.plytix.com/en/troubleshooting-and-faq#main-content)

    - [Imports](https://help.plytix.com/en/troubleshooting-and-faq#imports)
    - [Exports](https://help.plytix.com/en/troubleshooting-and-faq#exports)
    - [Attributes](https://help.plytix.com/en/troubleshooting-and-faq#attributes)
    - [Settings](https://help.plytix.com/en/troubleshooting-and-faq#settings)
    - [Product Families](https://help.plytix.com/en/troubleshooting-and-faq#product-families)
    - [Assets](https://help.plytix.com/en/troubleshooting-and-faq#assets)
    - [Brand Portals](https://help.plytix.com/en/troubleshooting-and-faq#brand-portals)
    - [Channels](https://help.plytix.com/en/troubleshooting-and-faq#channels)
    - [Shopify](https://help.plytix.com/en/troubleshooting-and-faq#shopify)
    - [Products](https://help.plytix.com/en/troubleshooting-and-faq#products)

[![Chill listening crop-3](https://help.plytix.com/hubfs/00%20Culture%20and%20branding/Branding%20-%20Logos/Plytix-logo-purple.svg "Chill listening crop-3")](https://help.plytix.com/)

Plytix Help Center

Copyright © 2026, Plytix.com, Inc.