ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do you make the following formula count 1,2,3, (https://www.excelbanter.com/excel-worksheet-functions/180395-how-do-you-make-following-formula-count-1-2-3-a.html)

Michael Angelo

how do you make the following formula count 1,2,3,
 
I'm using the following formula, but have to add the number lines manually. I
know there has to be a formula to ease my burden.

=COUNTIF(B$2:B1199,(1)), one being #1, =COUNTIF(B$2:B1199,(2))

Pete_UK

how do you make the following formula count 1,2,3,
 
Do you mean that you want the (1) to change to (2) automatically as you copy
the formula across? If so, try this:

=COUNTIF($B$2:$B1199,COLUMN(A1))

and copy across. The COLUMN(A1) (returning 1) will change to COLUMN(B1),
COLUMN(C1) etc, returning 2, 3 and so on.

Hope this helps.

Pete

"Michael Angelo" <Michael wrote in message
...
I'm using the following formula, but have to add the number lines
manually. I
know there has to be a formula to ease my burden.

=COUNTIF(B$2:B1199,(1)), one being #1, =COUNTIF(B$2:B1199,(2))




Ron Rosenfeld

how do you make the following formula count 1,2,3,
 
On Mon, 17 Mar 2008 16:55:01 -0700, Michael Angelo <Michael
wrote:

I'm using the following formula, but have to add the number lines manually. I
know there has to be a formula to ease my burden.

=COUNTIF(B$2:B1199,(1)), one being #1, =COUNTIF(B$2:B1199,(2))


I'm not sure what you are trying to do.

In general, to increment a number as you fill down, use this in place of your
number:

ROWS($1:1)

If you are incrementing as you fill across, use this:

COLUMNS($A:A)

--ron

Ron Rosenfeld

how do you make the following formula count 1,2,3,
 
On Tue, 18 Mar 2008 00:39:08 -0000, "Pete_UK" wrote:

Do you mean that you want the (1) to change to (2) automatically as you copy
the formula across? If so, try this:

=COUNTIF($B$2:$B1199,COLUMN(A1))

and copy across. The COLUMN(A1) (returning 1) will change to COLUMN(B1),
COLUMN(C1) etc, returning 2, 3 and so on.

Hope this helps.


That's OK so long as the OP understands that the value will change if he
"moves" the cell to a different column.
--ron

Pete_UK

how do you make the following formula count 1,2,3,
 
I'm not sure what the OP wants, Ron - mine was a wild guess, but you
seem to have come to a similar conclusion as well. I think you should
point out to him, though, that his count range will change if he
copies the formula down.

Pete

On Mar 18, 1:29*am, Ron Rosenfeld wrote:
On Tue, 18 Mar 2008 00:39:08 -0000, "Pete_UK" wrote:
Do you mean that you want the (1) to change to (2) automatically as you copy
the formula across? If so, try this:


=COUNTIF($B$2:$B1199,COLUMN(A1))


and copy across. The COLUMN(A1) (returning 1) will change to COLUMN(B1),
COLUMN(C1) etc, returning 2, 3 and so on.


Hope this helps.


That's OK so long as the OP understands that the value will change if he
"moves" the cell to a different column.
--ron



Ron Rosenfeld

how do you make the following formula count 1,2,3,
 
On Mon, 17 Mar 2008 18:39:17 -0700 (PDT), Pete_UK wrote:

I'm not sure what the OP wants, Ron - mine was a wild guess, but you
seem to have come to a similar conclusion as well. I think you should
point out to him, though, that his count range will change if he
copies the formula down.

Pete


I wasn't sure, either, what he wanted. So I just posted functions which vary
depending on whether he is filling down or across, and figured he would deal
with the range reference issue (or post back with more questions).
--ron

Michael Angelo[_2_]

how do you make the following formula count 1,2,3,
 
Ron / Pete, this fixes part of the problem, but now, it doesn't calculate my
criteria. The # of times a number appears in said column. It does for the
first entrie but not the second and third and so on.
=COUNTIF($B$2:$B1199,COLUMN(A1))= 112
=COUNTIF($B$2:$B1199,COLUMN(A2))= 112, should be 95


"Pete_UK" wrote:

Do you mean that you want the (1) to change to (2) automatically as you copy
the formula across? If so, try this:

=COUNTIF($B$2:$B1199,COLUMN(A1))

and copy across. The COLUMN(A1) (returning 1) will change to COLUMN(B1),
COLUMN(C1) etc, returning 2, 3 and so on.

Hope this helps.

Pete

"Michael Angelo" <Michael wrote in message
...
I'm using the following formula, but have to add the number lines
manually. I
know there has to be a formula to ease my burden.

=COUNTIF(B$2:B1199,(1)), one being #1, =COUNTIF(B$2:B1199,(2))





Pete_UK

how do you make the following formula count 1,2,3,
 
You must be copying it down, so the column has not changed but the row
has - substitute ROW for COLUMN in the formula, but then your range
will change so you will have to put a $ in front of the 1199 to stop
that changing as you copy down.

Hope this helps.

Pete

On Mar 18, 2:13*am, Michael Angelo
wrote:
Ron / Pete, this fixes part of the problem, but now, it doesn't calculate my
criteria. The # of times a number appears in said column. It does for the
first entrie but not the second and third and so on.
=COUNTIF($B$2:$B1199,COLUMN(A1))= 112
=COUNTIF($B$2:$B1199,COLUMN(A2))= 112, should be 95



"Pete_UK" wrote:
Do you mean that you want the (1) to change to (2) automatically as you copy
the formula across? If so, try this:


=COUNTIF($B$2:$B1199,COLUMN(A1))


and copy across. The COLUMN(A1) (returning 1) will change to COLUMN(B1),
COLUMN(C1) etc, returning 2, 3 and so on.


Hope this helps.


Pete


"Michael Angelo" <Michael wrote in message
...
I'm using the following formula, but have to add the number lines
manually. I
know there has to be a formula to ease my burden.


=COUNTIF(B$2:B1199,(1)), one being #1, *=COUNTIF(B$2:B1199,(2))- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 05:28 AM.

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