Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How do I count rows within a cell?

Hi,

I need to count the number of rows within one cell. Values have been input
using Alt+Enter to cut the data on separate rows.

If if helps, I could also count how often ".h" appears in the cell because
the data are C header files...

I'd like to use something built in. I can write a macro of my own if that's
the only option.

BTW, is there a max number of rows a cell can take in?

Thanks in advance,
Jouni


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How do I count rows within a cell?

=LEN(H1)-LEN(SUBSTITUTE(H1,CHAR(10),""))+1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jouni Kananen" wrote in message
...
Hi,

I need to count the number of rows within one cell. Values have been input
using Alt+Enter to cut the data on separate rows.

If if helps, I could also count how often ".h" appears in the cell because
the data are C header files...

I'd like to use something built in. I can write a macro of my own if

that's
the only option.

BTW, is there a max number of rows a cell can take in?

Thanks in advance,
Jouni




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How do I count rows within a cell?

Works perfectly, thanks Bob!

Jouni

"Bob Phillips" wrote in message
...
=LEN(H1)-LEN(SUBSTITUTE(H1,CHAR(10),""))+1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jouni Kananen" wrote in message
...
Hi,

I need to count the number of rows within one cell. Values have been
input
using Alt+Enter to cut the data on separate rows.

If if helps, I could also count how often ".h" appears in the cell
because
the data are C header files...

I'd like to use something built in. I can write a macro of my own if

that's
the only option.

BTW, is there a max number of rows a cell can take in?

Thanks in advance,
Jouni






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How do I count rows within a cell?

Jouni

Cells will hold 32767 characters, but will display only 1024 characters
normally.

The ALT + ENTERS will increase that 1024 limit quite a bit if entered every 100
chars or so.

Also the row height limitation will curtail display if the lines are quite
short.


Gord Dibben MS Excel MVP



On Tue, 24 Oct 2006 12:52:49 GMT, "Jouni Kananen"
wrote:

Hi,

I need to count the number of rows within one cell. Values have been input
using Alt+Enter to cut the data on separate rows.

If if helps, I could also count how often ".h" appears in the cell because
the data are C header files...

I'd like to use something built in. I can write a macro of my own if that's
the only option.

BTW, is there a max number of rows a cell can take in?

Thanks in advance,
Jouni


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
Find and Count Frequency of Numeric Value in Non-Contiguous Rows Sam via OfficeKB.com Excel Worksheet Functions 2 September 17th 06 09:17 PM
Count rows that match criteria in 2 different column cell ranges JoAnn New Users to Excel 2 December 9th 05 05:51 PM
count cell if value present in every other cell + criteria lrbest4x4xfar Excel Worksheet Functions 2 September 26th 05 01:30 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 04:39 AM.

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

About Us

"It's about Microsoft Excel"