Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a cell which has a number of lines within it. I want the number of lines it has to come into another cell. Is there any formula or macro for that? Eg: A1 content is: first line second line thrid line Once I use the formula/macro, say A2 will have value 3. Thanks a lot, fbhcah |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=LEN(F1)-LEN(SUBSTITUTE(F1,CHAR(10),""))
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "fbhcah" wrote in message ... Hi, I have a cell which has a number of lines within it. I want the number of lines it has to come into another cell. Is there any formula or macro for that? Eg: A1 content is: first line second line thrid line Once I use the formula/macro, say A2 will have value 3. Thanks a lot, fbhcah |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bob, slight tweak
=LEN(F1)-LEN(SUBSTITUTE(F1,CHAR(10),"")) <<< is 1 off << showing 8 versus 9 =LEN(F1)-LEN(SUBSTITUTE(F1,CHAR(10),"")) +1 << Last Line does not have Char(10) "Bob Phillips" wrote in message ... =LEN(F1)-LEN(SUBSTITUTE(F1,CHAR(10),"")) -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "fbhcah" wrote in message ... Hi, I have a cell which has a number of lines within it. I want the number of lines it has to come into another cell. Is there any formula or macro for that? Eg: A1 content is: first line second line thrid line Once I use the formula/macro, say A2 will have value 3. Thanks a lot, fbhcah |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your formula is "so cool" - I'd give anything to understand what you (and
the other top responders here) do. Tks "JMay" wrote in message news:kooZb.6674$iB.2484@lakeread06... Thanks Bob, slight tweak =LEN(F1)-LEN(SUBSTITUTE(F1,CHAR(10),"")) <<< is 1 off << showing 8 versus 9 =LEN(F1)-LEN(SUBSTITUTE(F1,CHAR(10),"")) +1 << Last Line does not have Char(10) "Bob Phillips" wrote in message ... =LEN(F1)-LEN(SUBSTITUTE(F1,CHAR(10),"")) -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "fbhcah" wrote in message ... Hi, I have a cell which has a number of lines within it. I want the number of lines it has to come into another cell. Is there any formula or macro for that? Eg: A1 content is: first line second line thrid line Once I use the formula/macro, say A2 will have value 3. Thanks a lot, fbhcah |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
counting number of word in a cell | Excel Discussion (Misc queries) | |||
Counting number of characters in a cell | Excel Worksheet Functions | |||
How do I make a cell with vertical lines for number entry? | Excel Discussion (Misc queries) | |||
How do I make lines appear after entering a number in a cell? | Excel Discussion (Misc queries) | |||
Counting the number of letters in a cell | Excel Discussion (Misc queries) |