#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Excel Function

I am working in a worksheet in which 1 is equal to a Want and 2 is =
to a Desire.

I need to tally each column so that at the bottom of the sheet one row
will add up all the 1's in each column while ignoring the 2's in that
column.

On the very next row, I need to tally each column so that it will
count how many 2's are in each column while ignoring the 1's.

I know there is a way I can write an IF statement to do this, I just
can't figure it out. Please help! Need asap.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel Function

Try these:

=COUNTIF(A1:A100,1)
=COUNTIF(A1:A100,2)

Adjust the range to suit.

Biff

wrote in message
ps.com...
I am working in a worksheet in which 1 is equal to a Want and 2 is =
to a Desire.

I need to tally each column so that at the bottom of the sheet one row
will add up all the 1's in each column while ignoring the 2's in that
column.

On the very next row, I need to tally each column so that it will
count how many 2's are in each column while ignoring the 1's.

I know there is a way I can write an IF statement to do this, I just
can't figure it out. Please help! Need asap.

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Excel Function

Thank you so very much! Worked like a charm!


On Jun 30, 1:00 pm, "T. Valko" wrote:
Try these:

=COUNTIF(A1:A100,1)
=COUNTIF(A1:A100,2)

Adjust the range to suit.

Biff

wrote in message

ps.com...



I am working in a worksheet in which 1 is equal to a Want and 2 is =
to a Desire.


I need to tally each column so that at the bottom of the sheet one row
will add up all the 1's in each column while ignoring the 2's in that
column.


On the very next row, I need to tally each column so that it will
count how many 2's are in each column while ignoring the 1's.


I know there is a way I can write an IF statement to do this, I just
can't figure it out. Please help! Need asap.


Thanks!- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel Function

You're welcome. Thanks for the feedback!

Biff

wrote in message
ups.com...
Thank you so very much! Worked like a charm!


On Jun 30, 1:00 pm, "T. Valko" wrote:
Try these:

=COUNTIF(A1:A100,1)
=COUNTIF(A1:A100,2)

Adjust the range to suit.

Biff

wrote in message

ps.com...



I am working in a worksheet in which 1 is equal to a Want and 2 is =
to a Desire.


I need to tally each column so that at the bottom of the sheet one row
will add up all the 1's in each column while ignoring the 2's in that
column.


On the very next row, I need to tally each column so that it will
count how many 2's are in each column while ignoring the 1's.


I know there is a way I can write an IF statement to do this, I just
can't figure it out. Please help! Need asap.


Thanks!- Hide quoted text -


- Show quoted text -





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Excel Function

Try the COUNTIF function:

Example:
=COUNTIF($A$1:$A$10,2)
....Counts the number of 2's in A1:A10

=COUNTIF($A$1:$A$10,1)
....Counts the number of 1's in A1:A10

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

I am working in a worksheet in which 1 is equal to a Want and 2 is =
to a Desire.

I need to tally each column so that at the bottom of the sheet one row
will add up all the 1's in each column while ignoring the 2's in that
column.

On the very next row, I need to tally each column so that it will
count how many 2's are in each column while ignoring the 1's.

I know there is a way I can write an IF statement to do this, I just
can't figure it out. Please help! Need asap.

Thanks!




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Excel Function

I am working in a worksheet in which 1 is equal to a Want and 2 is =
to a Desire.

I need to tally each column so that at the bottom of the sheet one row
will add up all the 1's in each column while ignoring the 2's in that
column.

On the very next row, I need to tally each column so that it will
count how many 2's are in each column while ignoring the 1's.

I know there is a way I can write an IF statement to do this, I just
can't figure it out. Please help! Need asap.


Put this formula first under your columns...

=COUNTIF(INDIRECT(CHAR(64+COLUMN())&"1:"&CHAR(64+C OLUMN())&(ROW()-1)),"=1")

It counts the number of 1s in the column. Put this formula under it...

=COUNTIF(INDIRECT(CHAR(64+COLUMN())&"1:"&CHAR(64+C OLUMN())&(ROW()-2)),"=2")

It counts the number of 2s in the column. Now select both of the cells you
just put the formulas in and copy across for all of your columns. These
formulas will automatically account for your adding or deleting rows in the
future.

Rick

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
Excel 2002: Auto Sum function not working in large Excel file Mr. Low Excel Discussion (Misc queries) 3 May 25th 07 03:36 PM
challenge! javascript function into excel function Kamila Excel Worksheet Functions 2 February 19th 07 06:35 AM
FUNCTION GETPIVOTDATA MICROSOFT EXCEL 2003 VS EXCEL 2004 FOR MAC FRANCISCO PEREZ-LANDAETA Excel Worksheet Functions 0 July 6th 06 01:25 PM
Excel Workday Function with another function Monique Excel Discussion (Misc queries) 2 April 27th 06 01:11 PM
Can you nest a MID function within a IF function in Excel Dawn-Anne Excel Worksheet Functions 2 March 4th 05 01:37 PM


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