ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   counting numbers?? (https://www.excelbanter.com/excel-worksheet-functions/173866-counting-numbers.html)

bouncebackability

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

Tyro[_2_]

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




Ron Rosenfeld

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

Per Erik Midtrød[_2_]

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

T. Valko

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




T. Valko

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






Tyro[_2_]

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








T. Valko

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




All times are GMT +1. The time now is 07:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com