Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default Count based on single number in string

The column has data like this A1, 7*4*9; A2, 1*4; A3, 9*10. The numbers vary
as well as the length. The numbers are always whole numbers and never
negative. I need to count the number of cells that have a number less than
six immediately to the right of the first asterink from the left. The
asterink has nothing to do with multiplication. I tried to modify a formula
from my previous question but struck out. Thank you for your assistance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count based on single number in string

Will there *always* be at least 2 numbers in the cell?

1*4
1*4*10
1
4
1*
*

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
The column has data like this A1, 7*4*9; A2, 1*4; A3, 9*10. The numbers
vary
as well as the length. The numbers are always whole numbers and never
negative. I need to count the number of cells that have a number less than
six immediately to the right of the first asterink from the left. The
asterink has nothing to do with multiplication. I tried to modify a
formula
from my previous question but struck out. Thank you for your assistance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default Count based on single number in string

Yes

"T. Valko" wrote:

Will there *always* be at least 2 numbers in the cell?

1*4
1*4*10
1
4
1*
*

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
The column has data like this A1, 7*4*9; A2, 1*4; A3, 9*10. The numbers
vary
as well as the length. The numbers are always whole numbers and never
negative. I need to count the number of cells that have a number less than
six immediately to the right of the first asterink from the left. The
asterink has nothing to do with multiplication. I tried to modify a
formula
from my previous question but struck out. Thank you for your assistance.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count based on single number in string

Try this...

Assumes no empty/blank cells.

=SUMPRODUCT(--(--MID(A1:A5,FIND("*",A1:A5)+1,FIND("~",SUBSTITUTE(A1 :A5&"*","*","~",2))-FIND("*",A1:A5)-1)<6))

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
Yes

"T. Valko" wrote:

Will there *always* be at least 2 numbers in the cell?

1*4
1*4*10
1
4
1*
*

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
The column has data like this A1, 7*4*9; A2, 1*4; A3, 9*10. The numbers
vary
as well as the length. The numbers are always whole numbers and never
negative. I need to count the number of cells that have a number less
than
six immediately to the right of the first asterink from the left. The
asterink has nothing to do with multiplication. I tried to modify a
formula
from my previous question but struck out. Thank you for your
assistance.






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default Count based on single number in string

Thank you. Unfortunately I am getting a value error. I have checked numerous
times for any typing errors but do not see any. What does the "~" refer to.
Also, I erred when I indicated that there will always be at least 2 numbers
in the cell. Upon rare occassions there may not be any numbers in the cell.
Hopefully that does not happen because it means sad news.

"T. Valko" wrote:

Try this...

Assumes no empty/blank cells.

=SUMPRODUCT(--(--MID(A1:A5,FIND("*",A1:A5)+1,FIND("~",SUBSTITUTE(A1 :A5&"*","*","~",2))-FIND("*",A1:A5)-1)<6))

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
Yes

"T. Valko" wrote:

Will there *always* be at least 2 numbers in the cell?

1*4
1*4*10
1
4
1*
*

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
The column has data like this A1, 7*4*9; A2, 1*4; A3, 9*10. The numbers
vary
as well as the length. The numbers are always whole numbers and never
negative. I need to count the number of cells that have a number less
than
six immediately to the right of the first asterink from the left. The
asterink has nothing to do with multiplication. I tried to modify a
formula
from my previous question but struck out. Thank you for your
assistance.








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count based on single number in string

To get this to work properly we will need to know what are *all* the
possible types of cell entires. Try to list a good representative sample of
*all* possible cell entries.

Are there any empty cells in the range? Are there any formulas in the range
that return formula blanks?

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
Thank you. Unfortunately I am getting a value error. I have checked
numerous
times for any typing errors but do not see any. What does the "~" refer
to.
Also, I erred when I indicated that there will always be at least 2
numbers
in the cell. Upon rare occassions there may not be any numbers in the
cell.
Hopefully that does not happen because it means sad news.

"T. Valko" wrote:

Try this...

Assumes no empty/blank cells.

=SUMPRODUCT(--(--MID(A1:A5,FIND("*",A1:A5)+1,FIND("~",SUBSTITUTE(A1 :A5&"*","*","~",2))-FIND("*",A1:A5)-1)<6))

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
Yes

"T. Valko" wrote:

Will there *always* be at least 2 numbers in the cell?

1*4
1*4*10
1
4
1*
*

--
Biff
Microsoft Excel MVP


"Basenji" wrote in message
...
The column has data like this A1, 7*4*9; A2, 1*4; A3, 9*10. The
numbers
vary
as well as the length. The numbers are always whole numbers and
never
negative. I need to count the number of cells that have a number
less
than
six immediately to the right of the first asterink from the left.
The
asterink has nothing to do with multiplication. I tried to modify a
formula
from my previous question but struck out. Thank you for your
assistance.








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
count based on single number Basenji Excel Worksheet Functions 13 July 13th 09 07:20 PM
How to count the number of occurrence within string? Eric Excel Discussion (Misc queries) 2 October 12th 08 08:56 AM
Convert YYYY, MM, and DD as a single number string rmorrison Excel Discussion (Misc queries) 13 September 20th 08 05:27 PM
count number of letters in a string Wiley Excel Worksheet Functions 3 May 11th 06 06:54 PM
count number of occurences within a string Gabriel Excel Worksheet Functions 2 November 25th 04 04:17 PM


All times are GMT +1. The time now is 12:17 AM.

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

About Us

"It's about Microsoft Excel"