Insert a Tab character inside cell

R

ryanmhuc

I'm using Excel 2003 and would like to insert a tab character inside a
cell. I have tried CTRL + ALT + TAB to insert a tab chacater inside a
cell but nothing happens.

Does anyone know how to enter a tab character? Thanks
 
G

Gord Dibben

You cannot insert a Tab character in a cell.

You can insert a linefeed using Alt + Enter


Gord Dibben MS Excel MVP
 
R

Rick Rothstein \(MVP - VB\)

Strange, it looks like you can concatenate a Tab character into a string,
but Excel won't show it to you. Enter this into A1...

="A"&CHAR(9)&"B"

(the ASCII value for the <horizontal> Tab character is 9) and put this in
B1...

=LEN(A1)

A length of 3 characters will be shown for A1, but there will appear to be
only 2 characters in it.

Rick
 
G

Gord Dibben

Rick

Using your formula I get A and the little hollow square Tab character and the B

But this does not constitute an in-cell Tab.

On the other hand CHAR(10) will give you an in-cell line feed which responds to
Wrap Text formatting.


Gord
 
R

Rick Rothstein \(MVP - VB\)

Hmm! I wonder why I don't get the "hollow square". I'm using XL2003 on
Vista... I wonder if that matters? Or is there a "don't show unprintable
characters" option somewhere that I missed?

Still, it is a Tab character, it just seems like Excel doesn't do anything
display-wise with it. The character (invisible on my system, a hollow box on
yours) does retain its ASCII code value of 9 (which is the ASCII code value
of a Tab character); we can see this via this formula...

=CODE(MID(A1,2,1))

Rick
 
P

Pete_UK

Rick,

I get AB displayed (no hollow box), even with several CHAR(9)
characters in the formula. This is XL2k on Windows XP, fwiw.

Pete
 
G

Gord Dibben

Excel 2003 SP3 and WindowsXP SP2 on my machine.

Don't know what determines whether or not the hollow box is visible or not.

Do you get the linefeed box when you Alt + Enter and disable wrap text?


Gord
 
G

Gord Dibben

In A1 enter =CHAR(ROW())

Copy down.

Do you see hollow boxes down to A31?


Gord
 
R

RagDyeR

What is your reason for inserting that tab?

What action exactly do you expect it to perform?
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

I'm using Excel 2003 and would like to insert a tab character inside a
cell. I have tried CTRL + ALT + TAB to insert a tab chacater inside a
cell but nothing happens.

Does anyone know how to enter a tab character? Thanks
 
R

Rick Rothstein \(MVP - VB\)

I don't... I see various symbols or empty squares. For example, at Row 14, I
see a music note symbol, at Row 17 I see a filled-in left-pointing triangle,
at Row 26 a right-pointing arrow, at Row 27 a left-pointing arrow, scattered
around in other positions are what looks like the old line drawing
characters from DOS days, and so on.

Rick
 
R

Rick Rothstein \(MVP - VB\)

Do you get the linefeed box when you Alt + Enter and disable wrap text?

No, I don't... the text is joined with nothing between them.

Rick
 
R

RagDyeR

Are you, by chance, using a custom font?
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

message I don't... I see various symbols or empty squares. For example, at Row 14, I
see a music note symbol, at Row 17 I see a filled-in left-pointing triangle,
at Row 26 a right-pointing arrow, at Row 27 a left-pointing arrow, scattered
around in other positions are what looks like the old line drawing
characters from DOS days, and so on.

Rick
 
R

Rick Rothstein \(MVP - VB\)

I'm using Arial

Rick


RagDyeR said:
Are you, by chance, using a custom font?
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

message I don't... I see various symbols or empty squares. For example, at Row 14,
I
see a music note symbol, at Row 17 I see a filled-in left-pointing
triangle,
at Row 26 a right-pointing arrow, at Row 27 a left-pointing arrow,
scattered
around in other positions are what looks like the old line drawing
characters from DOS days, and so on.

Rick
 
G

Gord Dibben

That is the strangest darn thing.

Sounds like you have some kinda Dingbats font enabled for that column.

But you did answer Arial to RD's query so I have no ideas.


Gord
 
R

Roger Govier

Hi Rick

I see exactly the same as you in XL2003 on Vista SP1.
I just went to my wife's machine running XP professional and get the same
result.
XL2007 gives same result also on both operating systems
 
R

Rick Rothstein \(MVP - VB\)

Thanks for the confirmation. I just fired up my copy of XL2007 and it too
displays the same symbols as my copy of XL2003 did. I'm not sure if I am at
Vista SP1 or not (how would I check that?). Interestingly enough, if you
highlight the column of symbols and change the font name, the symbols remain
(they change size, but I don't think their shapes are any different). If you
type text into one of those cells, the text is definitely in the newly
assigned font. So... anybody... what's going on here?

Rick
 
R

ryanmhuc

I also get the block/square in excel 2003 on XP

I want to insert a tab character to indent the text but i don't want
to use the alignmen indent. This is because there is a program which
will read in the excel file and based on how many tabs precede the
text in the cell a specific action will be performed (The alignment
indent will not be counted as a tab so that will not work). I also
need the visual indentation as without you will not be able to see
what you are creating.

Perhaps there is not way to do this in excel.
 
B

Billy Liddel

Hi

The OP said that he wanted to paste the stuff into another package.
Copying ="A"&CHAR(9)&"B" into Notepad returned "A (tab) B"
Trying the same in Word gave A B
Copying the formula into Word as Paste Special, RTF gave the correct
results. Maybe this will be sufficient for the OP.

Regards
Peter
 

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

Top