Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 7
Question counting numbers??

probably not a suitable title...

ok my problem should be simple to explain.

i have in column B (from cells B2 to B20) 8 asterisks randomly placed(*)

what i want to do is in column A (A2 to A20), the first time that the star appears to write a '1' in the relative cell next to it, the second time it appears in the list a '2' the third time a '3' and so on... sounds simple and i thought it was. but im stumped. and dont know what to search for on here sorry :(

thanks for any help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default counting numbers??

One way. Put this formula in A2 and drag it through A20:
=IF(B2="*",COUNTIF($B$2:B2,"*"),"")

Tyro

"bouncebackability" wrote in
message ...

probably not a suitable title...

ok my problem should be simple to explain.

i have in column B (from cells B2 to B20) 8 asterisks randomly
placed(*)

what i want to do is in column A (A2 to A20), the first time that the
star appears to write a '1' in the relative cell next to it, the second
time it appears in the list a '2' the third time a '3' and so on...
sounds simple and i thought it was. but im stumped. and dont know what
to search for on here sorry :(

thanks for any help




--
bouncebackability



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default counting numbers??

On Tue, 22 Jan 2008 18:32:39 +0000, bouncebackability
wrote:


probably not a suitable title...

ok my problem should be simple to explain.

i have in column B (from cells B2 to B20) 8 asterisks randomly
placed(*)

what i want to do is in column A (A2 to A20), the first time that the
star appears to write a '1' in the relative cell next to it, the second
time it appears in the list a '2' the third time a '3' and so on...
sounds simple and i thought it was. but im stumped. and dont know what
to search for on here sorry :(

thanks for any help



This assumes that the cell in column B will be either empty (blank), contain a
null string, or contain an asterisk.

A1: =IF(B1="","",COUNTIF($B$1:B1,"~*"))

Fill down to A20
--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default counting numbers??

On Jan 22, 7:32 pm, bouncebackability <bouncebackability.
wrote:
probably not a suitable title...

ok my problem should be simple to explain.

i have in column B (from cells B2 to B20) 8 asterisks randomly
placed(*)

what i want to do is in column A (A2 to A20), the first time that the
star appears to write a '1' in the relative cell next to it, the second
time it appears in the list a '2' the third time a '3' and so on...
sounds simple and i thought it was. but im stumped. and dont know what
to search for on here sorry :(

thanks for any help

--
bouncebackability


Put this formula in A2:
=IF(B2="*";COUNTIF(B$2:B2;"*");"")

Per Erik
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default counting numbers??

Enter this formula in A2 and copy down as needed:

=IF(B2="*",COUNTIF(B$2:B2,"~*"),"")

--
Biff
Microsoft Excel MVP


"bouncebackability" wrote in
message ...

probably not a suitable title...

ok my problem should be simple to explain.

i have in column B (from cells B2 to B20) 8 asterisks randomly
placed(*)

what i want to do is in column A (A2 to A20), the first time that the
star appears to write a '1' in the relative cell next to it, the second
time it appears in the list a '2' the third time a '3' and so on...
sounds simple and i thought it was. but im stumped. and dont know what
to search for on here sorry :(

thanks for any help




--
bouncebackability





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default counting numbers??

=IF(B2="*",COUNTIF($B$2:B2,"*"),"")

If there are any text entries in the range that formula will count them.

Try it with this data:

*
*
x
*

--
Biff
Microsoft Excel MVP


"Tyro" wrote in message
...
One way. Put this formula in A2 and drag it through A20:
=IF(B2="*",COUNTIF($B$2:B2,"*"),"")

Tyro

"bouncebackability" wrote in
message ...

probably not a suitable title...

ok my problem should be simple to explain.

i have in column B (from cells B2 to B20) 8 asterisks randomly
placed(*)

what i want to do is in column A (A2 to A20), the first time that the
star appears to write a '1' in the relative cell next to it, the second
time it appears in the list a '2' the third time a '3' and so on...
sounds simple and i thought it was. but im stumped. and dont know what
to search for on here sorry :(

thanks for any help




--
bouncebackability





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default counting numbers??

Forgot the ~

"T. Valko" wrote in message
...
=IF(B2="*",COUNTIF($B$2:B2,"*"),"")


If there are any text entries in the range that formula will count them.

Try it with this data:

*
*
x
*

--
Biff
Microsoft Excel MVP


"Tyro" wrote in message
...
One way. Put this formula in A2 and drag it through A20:
=IF(B2="*",COUNTIF($B$2:B2,"*"),"")

Tyro

"bouncebackability" wrote in
message ...

probably not a suitable title...

ok my problem should be simple to explain.

i have in column B (from cells B2 to B20) 8 asterisks randomly
placed(*)

what i want to do is in column A (A2 to A20), the first time that the
star appears to write a '1' in the relative cell next to it, the second
time it appears in the list a '2' the third time a '3' and so on...
sounds simple and i thought it was. but im stumped. and dont know what
to search for on here sorry :(

thanks for any help




--
bouncebackability







  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default counting numbers??

"Per Erik Midtrød" wrote in message
...
On Jan 22, 7:32 pm, bouncebackability <bouncebackability.
wrote:
probably not a suitable title...

ok my problem should be simple to explain.

i have in column B (from cells B2 to B20) 8 asterisks randomly
placed(*)

what i want to do is in column A (A2 to A20), the first time that the
star appears to write a '1' in the relative cell next to it, the second
time it appears in the list a '2' the third time a '3' and so on...
sounds simple and i thought it was. but im stumped. and dont know what
to search for on here sorry :(

thanks for any help

--
bouncebackability


Put this formula in A2:
=IF(B2="*";COUNTIF(B$2:B2;"*");"")

Per Erik


See my reply to Tyro.

--
Biff
Microsoft Excel MVP


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
Counting two numbers vijaydsk1970 Excel Worksheet Functions 3 April 3rd 07 06:27 PM
counting numbers dmack Excel Discussion (Misc queries) 6 January 24th 07 07:50 PM
Counting Numbers Funkydan Excel Discussion (Misc queries) 3 November 19th 06 10:13 AM
counting numbers cj21 Excel Discussion (Misc queries) 6 February 16th 06 11:28 PM
Counting numbers cj21 Excel Discussion (Misc queries) 10 February 16th 06 06:55 PM


All times are GMT +1. The time now is 04:16 PM.

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"