• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help needed on IF and CONCATENATE formula

Dear Members,

I am trying to use a combination of Concatenate and IF formula to produce an email.

My input.

D4: First Name:
D5: Middle Name:
D6: Last Name:

D8: Organization:

Once all these are filled, I want the formula to produce a result like

FirstName.M.LastName@Organization.com

I have used the following formula.

=CONCATENATE(D4,".",IF(D5<>" ",CONCATENATE(LEFT(D5,1),".",D6),D6),"@",D8)

Problem is if there is a middle name the formula works fine, but in case where there is no middle name, it produces the following result.

FirstName..LastName@Organization.com

Please advice how do I remove the additional (.) in cases where there is no middle name.

Please help.

Regards
 

Attachments

=CONCATENATE(D4,".",IF(D5="",D6,CONCATENATE(LEFT(D5,1),".",D6)),"@",D8)

Use this formula

Its the same as you posted , You were getting the wrong result becaise you were checking for " " in middle name , ideally when its blank it has to be checked for ""
 
Back
Top