Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Strange request: Counting cells and percentages

I'm not even sure how to formulate this right, so please forgive the generic
thread title.

I'm racking my brains trying to come up with a formula for an analytical
spreadsheet I'm working on. What I need to do, and haven't been able to
figure it out, is to count how many occurrences o X I have, excluding some
cells, and represent that in a percentage of the total.

To give a clearer picture, I have many columns with years. Say, 2008, 2007,
2006, and so on. Each year has, say, either X or Y. Now I can figure out the
times X occurs, and its percentage of total, no problem. But what I can't see
how to formulate, is getting the total and percentage of total since a given
year. For instance, if my spreadsheet has years going back to 1980, I want to
get a percentage of the total since 1995 only.

Am I being clear? It makes sense to me...
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Strange request: Counting cells and percentages

Let's assume:

B1:H1 = year numbers 2008,2007,2006 ...2002
B2:H10 = X or Y

To count X from 2008 to a chosen year:

A15 = chosen year

=SUMPRODUCT(--(B2:B10:INDEX(B2:H10,,MATCH(A15,B1:H1,0))="X"))

From that, you should be able to figure out how to get the %.

--
Biff
Microsoft Excel MVP


"jmj713" wrote in message
...
I'm not even sure how to formulate this right, so please forgive the
generic
thread title.

I'm racking my brains trying to come up with a formula for an analytical
spreadsheet I'm working on. What I need to do, and haven't been able to
figure it out, is to count how many occurrences o X I have, excluding some
cells, and represent that in a percentage of the total.

To give a clearer picture, I have many columns with years. Say, 2008,
2007,
2006, and so on. Each year has, say, either X or Y. Now I can figure out
the
times X occurs, and its percentage of total, no problem. But what I can't
see
how to formulate, is getting the total and percentage of total since a
given
year. For instance, if my spreadsheet has years going back to 1980, I want
to
get a percentage of the total since 1995 only.

Am I being clear? It makes sense to me...



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Strange request: Counting cells and percentages

Thanks for this formula, but I think I'm either implementing it wrong, or it
doesn't fit what I'm looking for.

What I need to have are several things: Total (from 1980 to 2008), Total X
(number and percent of total), Total Y (number and percent of total), and for
each X and Y also Total from 1995 to 2008, and this number also represent as
percent of total since 1995. Does that make sense? This should give me seven
numbers. And the "total percent of X" and the "total percent of X since 1995"
should theoretically be different numbers.

"T. Valko" wrote:

Let's assume:

B1:H1 = year numbers 2008,2007,2006 ...2002
B2:H10 = X or Y

To count X from 2008 to a chosen year:

A15 = chosen year

=SUMPRODUCT(--(B2:B10:INDEX(B2:H10,,MATCH(A15,B1:H1,0))="X"))

From that, you should be able to figure out how to get the %.

--
Biff
Microsoft Excel MVP


"jmj713" wrote in message
...
I'm not even sure how to formulate this right, so please forgive the
generic
thread title.

I'm racking my brains trying to come up with a formula for an analytical
spreadsheet I'm working on. What I need to do, and haven't been able to
figure it out, is to count how many occurrences o X I have, excluding some
cells, and represent that in a percentage of the total.

To give a clearer picture, I have many columns with years. Say, 2008,
2007,
2006, and so on. Each year has, say, either X or Y. Now I can figure out
the
times X occurs, and its percentage of total, no problem. But what I can't
see
how to formulate, is getting the total and percentage of total since a
given
year. For instance, if my spreadsheet has years going back to 1980, I want
to
get a percentage of the total since 1995 only.

Am I being clear? It makes sense to me...




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Strange request: Counting cells and percentages

That is to say, I can figure out how to get a total of X since 1995. I can't
figure out how to get a relative percentage of X since 1995.
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Strange request: Counting cells and percentages

I see you started another post so I'm deferring to that other post.

--
Biff
Microsoft Excel MVP


"jmj713" wrote in message
...
Thanks for this formula, but I think I'm either implementing it wrong, or
it
doesn't fit what I'm looking for.

What I need to have are several things: Total (from 1980 to 2008), Total X
(number and percent of total), Total Y (number and percent of total), and
for
each X and Y also Total from 1995 to 2008, and this number also represent
as
percent of total since 1995. Does that make sense? This should give me
seven
numbers. And the "total percent of X" and the "total percent of X since
1995"
should theoretically be different numbers.

"T. Valko" wrote:

Let's assume:

B1:H1 = year numbers 2008,2007,2006 ...2002
B2:H10 = X or Y

To count X from 2008 to a chosen year:

A15 = chosen year

=SUMPRODUCT(--(B2:B10:INDEX(B2:H10,,MATCH(A15,B1:H1,0))="X"))

From that, you should be able to figure out how to get the %.

--
Biff
Microsoft Excel MVP


"jmj713" wrote in message
...
I'm not even sure how to formulate this right, so please forgive the
generic
thread title.

I'm racking my brains trying to come up with a formula for an
analytical
spreadsheet I'm working on. What I need to do, and haven't been able to
figure it out, is to count how many occurrences o X I have, excluding
some
cells, and represent that in a percentage of the total.

To give a clearer picture, I have many columns with years. Say, 2008,
2007,
2006, and so on. Each year has, say, either X or Y. Now I can figure
out
the
times X occurs, and its percentage of total, no problem. But what I
can't
see
how to formulate, is getting the total and percentage of total since a
given
year. For instance, if my spreadsheet has years going back to 1980, I
want
to
get a percentage of the total since 1995 only.

Am I being clear? It makes sense to me...






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
REQUEST FORMULA FOR COUNTING & SUM IN DUPLICATES PERANISH Excel Worksheet Functions 8 June 23rd 08 04:24 PM
Macro Request: Fill in empty cells with previous Filled cell in column Artis Excel Worksheet Functions 2 June 25th 07 08:30 PM
Strange, Irregular Merge of Cells dhunton Excel Discussion (Misc queries) 0 January 18th 07 08:26 PM
Percentages between two cells chedd via OfficeKB.com Excel Worksheet Functions 1 June 8th 06 12:00 PM
Percentages and counting Millerk Excel Discussion (Misc queries) 4 March 6th 06 05:14 PM


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

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"