Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ty ty is offline
external usenet poster
 
Posts: 19
Default how do I count the total number of characters in a excell cell?

Here are 5000 or so genes for a bacterial genome listed in my Excell 2007.
There are two columns. col (1) lists the gene names and col(2) lists the
corresponding nucleotides sequence like ATTCGGGG.....

is there a simple way to count the number of nucleotides (characters) in
each cell?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default how do I count the total number of characters in a excell cell?



=LEN(A1)

This includes spaces and other non-visible characters.

Regards,
Paul

--

"ty" wrote in message
...
Here are 5000 or so genes for a bacterial genome listed in my Excell 2007.
There are two columns. col (1) lists the gene names and col(2) lists the
corresponding nucleotides sequence like ATTCGGGG.....

is there a simple way to count the number of nucleotides (characters) in
each cell?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how do I count the total number of characters in a excell cell?

=len(a1)
will tell you the length of the string in A1.

=(len(a1)-len(substitute(a1,b1,"")))/len(b1)
will tell you the number of times B1 appears in A1.

ty wrote:

Here are 5000 or so genes for a bacterial genome listed in my Excell 2007.
There are two columns. col (1) lists the gene names and col(2) lists the
corresponding nucleotides sequence like ATTCGGGG.....

is there a simple way to count the number of nucleotides (characters) in
each cell?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how do I count the total number of characters in a excell cell?

ps. If you want to make the count case-insensitive (ASDF and aSdF and asdf are
all the same):

=(len(a1)-len(substitute(upper(a1),upper(b1),"")))/len(b1)

ty wrote:

Here are 5000 or so genes for a bacterial genome listed in my Excell 2007.
There are two columns. col (1) lists the gene names and col(2) lists the
corresponding nucleotides sequence like ATTCGGGG.....

is there a simple way to count the number of nucleotides (characters) in
each cell?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default how do I count the total number of characters in a excell cell

Say the nucleotide designator is:
ataacgctttaggg

Use this to count the 'a' characters:
=LEN(A1)-LEN(SUBSTITUTE(A1,"a",""))

Use this to count the 'c' and 'g' characters:
=LEN(A1)*2-LEN(SUBSTITUTE(A1,"c",""))-LEN(SUBSTITUTE(A1,"g",""))

Finally, use this to count all 'a' characters in a range (say A1:A3):
=SUM(LEN(A1:A3)-LEN(SUBSTITUTE(A1:A3,"a","")))
This function needs to be entered with ctrl + shift + enter (not just enter)


Regards,
Ryan---
--
RyGuy


"Dave Peterson" wrote:

ps. If you want to make the count case-insensitive (ASDF and aSdF and asdf are
all the same):

=(len(a1)-len(substitute(upper(a1),upper(b1),"")))/len(b1)

ty wrote:

Here are 5000 or so genes for a bacterial genome listed in my Excell 2007.
There are two columns. col (1) lists the gene names and col(2) lists the
corresponding nucleotides sequence like ATTCGGGG.....

is there a simple way to count the number of nucleotides (characters) in
each cell?


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default how do I count the total number of characters in a excell cell?

ty wrote:
Here are 5000 or so genes for a bacterial genome listed in my Excell 2007.
There are two columns. col (1) lists the gene names and col(2) lists the
corresponding nucleotides sequence like ATTCGGGG.....

is there a simple way to count the number of nucleotides (characters) in
each cell?


Note that you should format col (1) as text before loading the data to
prevent some gene names from getting automatically converted into dates.
I mention this because it was a big enough issue a while ago to make
the news (http://www.theregister.co.uk/2004/07...vanishing_dna/)
and a scientific journal (http://www.biomedcentral.com/1471-2105/5/80).
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
Total Cell Characters Count unekme Excel Discussion (Misc queries) 1 March 9th 09 01:17 PM
How can I count the number of characters on a cell? EddieDial800 Excel Discussion (Misc queries) 11 May 22nd 07 04:29 PM
Count Number of Characters in a cell? AHJuncti Excel Discussion (Misc queries) 2 June 16th 05 07:39 PM
How do you count number of characters in a single cell Joe Excel Worksheet Functions 1 February 18th 05 09:08 PM
How do you count number of characters in a single cell Joe Excel Worksheet Functions 1 February 18th 05 08:33 PM


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