PDA

View Full Version : [SOLVED] Reversed P in Excel



johnske
03-20-2005, 01:09 AM
Can anyone tell me what the Word 'paragraph end' character ( ? ) is called in Excel? (Or how to refer to it)

TIA
John

TonyJollans
03-20-2005, 04:35 AM
The character is called a pilcrow, but what do you want to do with it in Excel? AFAIK it has no special meaning in Excel. You can get it, as a character, with Alt+0182.

johnske
03-20-2005, 05:09 AM
Hi Tony,

Thanx, more specifically I want to get rid of/replace it after pasting cells in a text box.

Regards,
John

TonyJollans
03-20-2005, 06:36 PM
Sorry, John, a bit slow in replying.

I don't know how to do it without code (apart from manually). That sounds daft as I write it - what I mean is I don't know any way to stop them appearing or to automatically replace them with something else as you paste. If you're cutting and pasting a single cell it won't appear if you copy the cell contents rather than the cell. The easiest code solution is probably to loop through all your textboxes with a replace ..


YourTextbox = Replace(YourTextBox, vbNewLine, " ")

johnske
03-20-2005, 06:52 PM
Hi Tony,

Thank you. The problem is that I cant get the pilcrow to be recognized (even when it's specified as a character) so that it can be replaced.

But what you said above gives me an idea... viz: If Textbox1 = Selection is used for one cell, the problem doesn't occur. So, for multiple cells, instead of pasting, I could start looking at a loop to concatenate each of the selected cells with a space or line feed (as appropriate) between.

Thanx, will look at this other alternative and mark this solved for now...

Regards,
John :hi:

TonyJollans
03-21-2005, 01:29 AM
Hi John,

The pilcrow is only DISPLAYED in the text box, not actually present - it is a mark to show you that something (else, non-printable) is there (just as in Word). What is actually there is Chr(13) and Chr(10) - hence the vbNewLine in the Replace statement I posted - does that not work for you?

johnske
03-21-2005, 03:41 AM
Ohhh - yes, it does - sorry Tony, I misread what had put before.:blush I didn't know the vbNewLine in the Replace actually referred to the pilcrow, I thought you were just giving an example of... it doesn't matter now - it works! :yes


Thanx muchly

John :)