extra space in Dear Jim code in letter using full contact name

  • Thread starter Thread starter magmike
  • Start date Start date
M

magmike

Here is the code for my greeting line a report/letter:

=("Dear " & Left([SentTo],InStr([SentTo]," ")) & ":")

Which will turn Jim Jones to Dear Jim :

How do I get rid of the extra space?
 
Left([SentTo],InStr([SentTo]," ")-1)
or Trim(Left([SentTo],InStr([SentTo]," ")))
 
Try

=("Dear " & Left([SentTo],InStr([SentTo]," ")-1) & ":")

Or
=("Dear " & Trim(Left([SentTo],InStr([SentTo]," "))) & ":")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top