Jump to content

Combine and reformat different cells


Recommended Posts

Hi All, I will try and explain this issue as best I can. We have a mail list.

With header names, "First name", "Last Name", but the customer only wants to use the "First name", UNLESS there is only a single letter. If there is only a single letter for the "First name" they want the "Last name" added.


Example: "First Name" "R." "Last name" "Johnson" how they want it to appear is "R. Johnson" But they do not want the "Last name" field on all the records. ONLY on the ones that have a single letter "First name".



Link to comment
Share on other sites



Maybe a rule like this would work:


var name= '';


if(firstName.length === 1){

name = firstName + '. ' + lastName;

// depending on the data, you might need to strip away any character that's not a letter, and then add the period to the string.



name = firstName;



return name;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...