Help with a formula

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

Hello!!
I am working with 3 fields:

[Category]

[Sub-Category: Technology]

[Sub-Category: Industry]

I’m trying to write a formula that will combine [Category] with one of the other two fields, depending on the value in the [Category] field.

This is what I want the formula to say:

If [Category] is “Technology”, return [Category] & - & [Sub-Category: Technology]

If [Category] is “Industry”, return [Category] & - & [Sub-Category: Industry]


The result would look something like this: "Technology - Mobility"

("Technology" is the Category response and "Mobility" is the Sub-Category: Technology response)

I don't know why I am struggling with this formula but this community is always so very helpful, so I thought I would ask. Thank you in advance!

Photo of Karen

Karen

  • 222 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of dwhawe

dwhawe, Champion

  • 908 Points 500 badge 2x thumb
Try using Case:

Case([Category],"Technology",[Category]&" - "&[Sub-Category: Technology],"Industry",[Category]&" - "&[Sub-Category: Industry])
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
Case([Category],
 "Technology", [Category] & " - " & [Sub-Category: Technology],
  "Industry",   [Category] & " - " & [Sub-Category: Industry]
)
Photo of Karen

Karen

  • 222 Points 100 badge 2x thumb
This worked!!! Thank you SO SO much!!!