Results 1 to 3 of 3

Apostrophe in Concatenation

This is a discussion on Apostrophe in Concatenation within the Excel Questions forums, part of the Question Forums category; Hi, This will probably seem like a very simple query, but I am trying to concatenate 2 columns of excel. ...

  1. #1
    New Member
    Join Date
    Jul 2005
    Posts
    1

    Default Apostrophe in Concatenation

    Hi,
    This will probably seem like a very simple query, but I am trying to concatenate 2 columns of excel. One contains dates of birth and the next one contains a single apostrophe. They need to be merged, so that they can be compatible with SQL (the db guy can add them at the front end, but not the back).

    So, I write the formula (=H2&I2) in a new column and fill the remainder of the column with the formula and it displays a weird mixture of stuff. Some of the dates are in teh same format, but with no apostrophe, some cells contain a varied mixture of numbers.

    Can anyone help me with what I'm doing here please? I would be very grateful.

  2. #2
    Board Regular
    Join Date
    May 2005
    Posts
    483

    Default

    if u min u need to add apostrophe at the front,
    ="'"&H2&I2
    first apostrophe in excel means that the succeding characters will be recognized as string...
    so, typing
    'a gives a..
    ''a(2 apostrophe's) gives 'a

  3. #3
    Board Regular Brian from Maui's Avatar
    Join Date
    Feb 2002
    Posts
    8,156

    Default Re: Apostrophe in Concatenation

    Quote Originally Posted by lisabell
    Hi,
    This will probably seem like a very simple query, but I am trying to concatenate 2 columns of excel. One contains dates of birth and the next one contains a single apostrophe. They need to be merged, so that they can be compatible with SQL (the db guy can add them at the front end, but not the back).

    So, I write the formula (=H2&I2) in a new column and fill the remainder of the column with the formula and it displays a weird mixture of stuff. Some of the dates are in teh same format, but with no apostrophe, some cells contain a varied mixture of numbers.

    Can anyone help me with what I'm doing here please? I would be very grateful.
    =TEXT(H2,"DD/MM/YY")&CHAR(39)

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com