Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Count Frequency of Numeric Value in Non-Contiguous Rows | Excel Worksheet Functions | |||
Count rows that match criteria in 2 different column cell ranges | New Users to Excel | |||
count cell if value present in every other cell + criteria | Excel Worksheet Functions | |||
Possible Lookup Table | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |