Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Character (13)

Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2 stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Character (13)

Hari

Chr(10) as you point out is Linefeed
Chr(13) is carriage return and linefeed

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Hari" wrote in message
...
Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2 stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Character (13)

Back in the days of typewriters, getting to the next line involved two
actions. These were scrolling the feeder and returning the carriage to the
starting position. LineFeed and Carriage Return (LF and CR)
When computers started using typewriters, these commands were still used.
On modern computers, they are still in use as a hangover from these days.

I think that only Microsoft Operating Systems use both LF and CR for a new
line. Others just use LF.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Hari" wrote in message
...
Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2 stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Character (13)

Hi Nick and Rob,

Thnx a lot for your answers.

Rob - Thnx a ton for gving the historical perspective. Can appreciate it
better now.

--
Thanks a lot,
Hari
India
"Rob van Gelder" wrote in message
...
Back in the days of typewriters, getting to the next line involved two
actions. These were scrolling the feeder and returning the carriage to the
starting position. LineFeed and Carriage Return (LF and CR)
When computers started using typewriters, these commands were still used.
On modern computers, they are still in use as a hangover from these days.

I think that only Microsoft Operating Systems use both LF and CR for a new
line. Others just use LF.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Hari" wrote in message
...
Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2

stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Character (13)

There are a couple of constants in xl that you may want to use:

vbLf (line feed)
vbCr (carriage return)
vbNewLine (new line)
VBCrLf (both cr & lf)

When I use msgboxes, I do things like:

msgbox "Hi" & vblf & "hari"

JE McGimpsey (an advocate of cross platform programming (and a typical Mac user
<vbg) recommends:

msgbox "hi" & vbnewline & "hari"

From the immediate window in the VBE:

?asc(vblf)
10

?asc(vbcr)
13

?len(vbcrlf)
2
?asc(left(vbcrlf,1))
13
?asc(right(vbcrlf,1))
10

?len(vbnewline)
2
?asc(left(vbnewline,1))
13
?asc(right(vbnewline,1))
10

vbNewLine is platform dependent. Under windows, it's 2 characters. Under Mac,
it's just one (IIRC, LF).

Hari wrote:

Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2 stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Character (13)

Hi Dave,

Thnx a lot for instructive explanation using Imm.Window. Came to know about
it 2 days back and like the feature a lot.

--
Thanks a lot,
Hari
India

"Dave Peterson" wrote in message
...
There are a couple of constants in xl that you may want to use:

vbLf (line feed)
vbCr (carriage return)
vbNewLine (new line)
VBCrLf (both cr & lf)

When I use msgboxes, I do things like:

msgbox "Hi" & vblf & "hari"

JE McGimpsey (an advocate of cross platform programming (and a typical Mac

user
<vbg) recommends:

msgbox "hi" & vbnewline & "hari"

From the immediate window in the VBE:

?asc(vblf)
10

?asc(vbcr)
13

?len(vbcrlf)
2
?asc(left(vbcrlf,1))
13
?asc(right(vbcrlf,1))
10

?len(vbnewline)
2
?asc(left(vbnewline,1))
13
?asc(right(vbnewline,1))
10

vbNewLine is platform dependent. Under windows, it's 2 characters. Under

Mac,
it's just one (IIRC, LF).

Hari wrote:

Hi,

I searched in the help for this, but within - chr function - there is
explanation only for Chr(10) being a linefeed character.

I also went to the character set (0-127) but against 13 there are 2

stars.
and the same 2 stars are against chr(10).

Please tell me about the same.

--
Thanks a lot,
Hari
India


--

Dave Peterson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Formatting text in cell (character by character) TomC Excel Discussion (Misc queries) 0 January 29th 10 07:25 PM
Excel-Match 1st text character in a string to a known character? bushlite Excel Worksheet Functions 2 January 15th 07 06:36 PM
Can I create a special character for the Character Map? JohnP Excel Discussion (Misc queries) 3 December 24th 06 01:10 AM
Custom Character or re-defining a character Pellechi Excel Programming 0 September 30th 03 07:48 PM
Typing a quote character Vs pasting a quote character= whathappens to the resulting CSV? Interesting!! Jon Peltier[_3_] Excel Programming 0 August 3rd 03 02:22 AM


All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"