Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to count the number of 'values' in a cell


Hi

I am after something that seems simple, but I can't figure out a way to
do it.

If I have a single cell containing a list of values seperated by a
comma (ie a csv list in a cell), how do I count the number of values.
I figure it must be by counting the commas somehow and then adding one
as the last doesn't have it, but there is no way to tell how many there
will be.

My cell contents look like this
18911, 18801, 18825, 18482, 18941

so I want to have another cell return the number 5.

Does anyone have any ideas?

Regards
Sandi


--
Sandih
------------------------------------------------------------------------
Sandih's Profile: http://www.excelforum.com/member.php...o&userid=36225
View this thread: http://www.excelforum.com/showthread...hreadid=560150

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to count the number of 'values' in a cell


I think I have the answer I think the following function calculation
would work....

if
a1 contains 18911, 18801, 18825, 18482, 18941

then the following could give me the number of values in the cell

=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1


--
Sandih
------------------------------------------------------------------------
Sandih's Profile: http://www.excelforum.com/member.php...o&userid=36225
View this thread: http://www.excelforum.com/showthread...hreadid=560150

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
How do I count the number of times a letter is used in a cell? jsrawlings Excel Discussion (Misc queries) 5 June 28th 06 02:02 AM
COUNT THE NUMBER OF LETTERS INCLUDING SPACES IN A CELL? zurafz6 Excel Worksheet Functions 7 March 6th 06 07:53 AM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Count Number of Characters in a cell? AHJuncti Excel Discussion (Misc queries) 2 June 16th 05 07:39 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 11:18 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"