# IF AND Remove Text

Topic Labels: Formulas
Solved
Jump to Solution
400 4
cancel
Showing results for
Search instead for
Did you mean:
6 - Interface Innovator

I'm trying to write a formula to remove the "➟" if the preceeding field is empty.

Current Formula:

Origin" ➟ " &{Destination}&" ➟ "&{Backhaul From}" ➟ "&{Backhaul To\\Return}" ➟ " &Origin &" - LANE #" & {LANE#}

Here is the output of the above formula.  Formula above works great, (example 1 below) but if there is no data in {Backhaul From} and {Backhaul To\\Return} the result is example 2 with 2 extra arrows.  Example 3 is the desired results.

1) Walmart ➟ Kroger ➟ Target ➟ Walmart - Lane # 1
2) Walmart ➟ Kroger ➟ ➟ ➟ Walmart - Lane # 2
3) Walmart ➟ Kroger ➟ Walmart - Lane # 2

I've tried BLANK() IF AND with no luck.  Can this be accomplished?

2 Solutions

Accepted Solutions
18 - Pluto

Try using an IF for each field:

``````Origin &
IF(
Destination,
" ➟ " & {Destination}
) &
IF(
{Backhaul From},
" ➟ " & {Backhaul From}
)``````
10 - Mercury

Origin" ➟ " &{Destination}&
IF({Backhaul From}, " ➟ "&{Backhaul From})&
IF({Backhaul To\\Return}, " ➟ "&{Backhaul To\\Return})&
" ➟ " &Origin &" - LANE #" & {LANE#}

4 Replies 4
18 - Pluto

Try using an IF for each field:

``````Origin &
IF(
Destination,
" ➟ " & {Destination}
) &
IF(
{Backhaul From},
" ➟ " & {Backhaul From}
)``````
10 - Mercury

Origin" ➟ " &{Destination}&
IF({Backhaul From}, " ➟ "&{Backhaul From})&
IF({Backhaul To\\Return}, " ➟ "&{Backhaul To\\Return})&
" ➟ " &Origin &" - LANE #" & {LANE#}

6 - Interface Innovator

Thanks this worked!

6 - Interface Innovator

Thanks this worked!