Skip to main content
Solved

Creating a formula with multiple but separate IF statements


Forum|alt.badge.img+2

Hi and thanks in advance for the help!

I have multiple IF statements that I would like to include in one Formula field. Essentially what I want is the output to be in one formula column with the output being:

Result from IF STATEMENT#1
(line break)
Result from IF STATEMENT #2

IF STATEMENT #1

IF(
  {Requestor job level} = "Individual Contributor","🍅 Individual Contributor",
  IF(
  {Requestor job level} = "Performance Leader (Manager)","🍋 Performance Leader",
  IF(
  {Requestor job level} = "Strategic Leader (AVP+)","🥑 Strategic Leader"
  )))
 
IF STATEMENT #2
IF(
  {Type of event} = "Keynote","🍅 Keynote",
  IF(
  {Type of event} = "Live Interview","🍅 Live Interview",
  IF(
  {Type of event} = "Customer Journey Presentation","🍅 Customer Journey Presentation"
)))
 
 

Best answer by Enjay

I think this should do the trick. Wasn't sure if you actually wanted the extra line break in between the two lines. If you didn't, you can remove the & "\n" in the formula. Also wasn't sure if both variables were always present, either way if sometimes the first one isn't present and the second one is, it won't put the extra line breaks in. 

IF( {Requestor job level} = "Individual Contributor","🍅 Individual Contributor", IF( {Requestor job level} = "Performance Leader (Manager)","🍋 Performance Leader", IF( {Requestor job level} = "Strategic Leader (AVP+)","🥑 Strategic Leader" ))) & IF( {Type of event} = "Keynote",IF({Requestor job level},"\n" & "\n")&"🍅 Keynote", IF( {Type of event} = "Live Interview",IF({Requestor job level},"\n" & "\n")&"🍅 Live Interview", IF( {Type of event} = "Customer Journey Presentation",IF({Requestor job level},"\n" & "\n")&"🍅 Customer Journey Presentation" )))

 

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+4
  • New Participant
  • 1 reply
  • Answer
  • September 11, 2023

I think this should do the trick. Wasn't sure if you actually wanted the extra line break in between the two lines. If you didn't, you can remove the & "\n" in the formula. Also wasn't sure if both variables were always present, either way if sometimes the first one isn't present and the second one is, it won't put the extra line breaks in. 

IF( {Requestor job level} = "Individual Contributor","🍅 Individual Contributor", IF( {Requestor job level} = "Performance Leader (Manager)","🍋 Performance Leader", IF( {Requestor job level} = "Strategic Leader (AVP+)","🥑 Strategic Leader" ))) & IF( {Type of event} = "Keynote",IF({Requestor job level},"\n" & "\n")&"🍅 Keynote", IF( {Type of event} = "Live Interview",IF({Requestor job level},"\n" & "\n")&"🍅 Live Interview", IF( {Type of event} = "Customer Journey Presentation",IF({Requestor job level},"\n" & "\n")&"🍅 Customer Journey Presentation" )))

 


Forum|alt.badge.img+2
  • Author
  • New Participant
  • 1 reply
  • September 11, 2023
Enjay wrote:

I think this should do the trick. Wasn't sure if you actually wanted the extra line break in between the two lines. If you didn't, you can remove the & "\n" in the formula. Also wasn't sure if both variables were always present, either way if sometimes the first one isn't present and the second one is, it won't put the extra line breaks in. 

IF( {Requestor job level} = "Individual Contributor","🍅 Individual Contributor", IF( {Requestor job level} = "Performance Leader (Manager)","🍋 Performance Leader", IF( {Requestor job level} = "Strategic Leader (AVP+)","🥑 Strategic Leader" ))) & IF( {Type of event} = "Keynote",IF({Requestor job level},"\n" & "\n")&"🍅 Keynote", IF( {Type of event} = "Live Interview",IF({Requestor job level},"\n" & "\n")&"🍅 Live Interview", IF( {Type of event} = "Customer Journey Presentation",IF({Requestor job level},"\n" & "\n")&"🍅 Customer Journey Presentation" )))

 


Well that was incredibly easy! Thank you.


Reply