Forum Discussion

Tob_P's avatar
Tob_P
Icon for Helper V rankHelper V
3 years ago

Replace values in one column based on 3 criteria

Hi,

 

Complete novice when it comes to Custom Columns in Query Editor.

 

I have two columns, Primary email and Secondary email. I have a few condtions that I need met for my new column.

 

  1. If Primary email is blank, return the value in Secondary email, only if Secondary email contains '@emailaddress'
  2. If Primary email contains '@snailmailaddress', replace with value in Secondary email, provided it contains '@emailaddress'
  3. If Primary email is blank, and so is secondary, then return blank

Any guidance on this would be appreciated.

2 Replies

  • Hi,

    please post some sample data and your expected result

  • serpiva64 

    I've tried to post it as a table but MS think that I'm trying to spam as there's email addresses included so won't let me post it, so I'm afraid a screenshot will have to do..