Results 1 to 3 of 3

How to append a character before every cell

This is a discussion on How to append a character before every cell within the Excel Questions forums, part of the Question Forums category; hi, I am an absolute novice so my question might sound very elementary. What i need to do is very ...

  1. #1
    Board Regular
    Join Date
    Aug 2004
    Posts
    66

    Default How to append a character before every cell

    hi,

    I am an absolute novice so my question might sound very elementary.
    What i need to do is very simple.Just append a ' in front value of each of the cells after copying these cells froma different sheet.
    I tried to do it the other way round.First have a ' in each of the cells and then copy.
    But thats overwriting the '.Is there a way to append the ' to each of the cells after copying.I tried string append but it is saying type mismatch.

    Any suggestions would be appreciated.

    Thanks
    Mridz

  2. #2
    Board Regular
    Join Date
    Aug 2003
    Location
    England
    Posts
    4,710

    Default Re: How to append a character before every cell

    Hello and welcome to the board,

    add a column and have ="'" & A1 and copy down as far as necessary, then copy as VALUES into the column where you want the data.
    -------------------------
    Hope this is helpful.
    -------------------------

    Have been away from the forum for quite a while, but am now back.

  3. #3
    Board Regular
    Join Date
    Aug 2004
    Posts
    66

    Default Re: How to append a character before every cell

    hi..

    thanks for your reply,but I could not understand what exactly you are trying to say.
    Could you please elucidate.

    This is what i am trying to do:
    sample.Worksheets("BRACKET444 ASSEMBLY ").Range("A2:V127").Copy
    oSheet.Range("a2").PasteSpecial
    bracket 444 assembly is the excel sheet from which I am copying the values.
    Theres a samll catch here.Some of the values have a ' already appended.also some of the cells are empty and need to put a ' in them

    I tried out the following:
    oSheet.Range("a2:v127").Select(this is not working)

    For Each Item In Selection

    If ActiveCell.Value = "" Then


    ActiveCell.Value = "'"

    End If
    Next Item
    But how do i state the condition that if thers a ' already appended leave it as it is???

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