Help

IF THEN Formula Help Needed Please!

Topic Labels: Formulas
414 1
cancel
Showing results for 
Search instead for 
Did you mean: 
awhitaker
4 - Data Explorer
4 - Data Explorer

I am struggling to figure out an IF/THEN statement that includes an OR. Here is what I'm needing it to do.

I want to say "If there is anything populated in Column A, I want it to pull it into Column C. And if there is anything populated in Column B, I want it to pull into Column C, as well." 

Here is my current formula       

IF(OR({DMSID Formula},{EG DMSID Formula}),{DMSID Formula},{EG DMSID Formula})
 
This is pulling in "Column A" (DMSID Formula) into "Column C", but it is not pulling in "Column B" (EG DMSID Formula). 
 
Any suggestions??? I appreciate any help that anyone can provide!
1 Reply 1

It is easier to write these formulas if you share screen captures with sample data and sample results.

If you want the contents of {Column A} and {Column B}, you can just show both. If either is blank, it won't show anything. Note that if you want something other that a space between the column values, this particular formula will not work.

TRIM(CONCATENATE(
  {Column A},
  " ",
  {Column B}
))

 If you don't want to show {Column B} even if it has a value when there is no value for {Column A}, you can try something like this.

TRIM(CONCATENATE(
  {Column A},
  " ",
  IF({Column A}, {Column B})
))

And another option, just for fun because there are so many ways to do things in code. This one will also only show {Column B} if {Column A} has a value. This one lets you put any characters you want between the two values.

IF(
  AND(
    {Column A},
    {Column B}
  )
  {Column A} & ", " & {Column B},
  {Column A}
)