PC Review


Reply
Thread Tools Rate Thread

count instance

 
 
Brad
Guest
Posts: n/a
 
      29th Aug 2008
Thanks for taking the time to read my question.

I have a list of computer models and I'd like to have totals at the bottom
of each kind using a formula.


A
1 Laptop
2 Desktop
3 Server
4 Laptop
5 Desktop
6 Desktop
7 Laptop

So my formula would look at column A rows 1 to 7

Total Laptops = 3 (calculated value, not static value)
Total Desktops = 3 (calculated value, not static value)
Total Servers = 1 (calculated value, not static value)

I was thinking of an array, but I'm not sure how to do that, or if it is the
correct approach.

Thanks again for your help,

Brad
 
Reply With Quote
 
 
 
 
Brad
Guest
Posts: n/a
 
      29th Aug 2008
{=SUM(IF(A1:A7="Desktop",1,0))}

Is what I used and it worked.

Brad

"Brad" wrote:

> Thanks for taking the time to read my question.
>
> I have a list of computer models and I'd like to have totals at the bottom
> of each kind using a formula.
>
>
> A
> 1 Laptop
> 2 Desktop
> 3 Server
> 4 Laptop
> 5 Desktop
> 6 Desktop
> 7 Laptop
>
> So my formula would look at column A rows 1 to 7
>
> Total Laptops = 3 (calculated value, not static value)
> Total Desktops = 3 (calculated value, not static value)
> Total Servers = 1 (calculated value, not static value)
>
> I was thinking of an array, but I'm not sure how to do that, or if it is the
> correct approach.
>
> Thanks again for your help,
>
> Brad

 
Reply With Quote
 
Duke Carey
Guest
Posts: n/a
 
      29th Aug 2008
Assuming each cell contains JUST the words you show, you should use

=COUNTIF(A1:a7,"Laptop") and repeat for the other 2 types

if the cells could contain characters in addition to "Laptop", etc, then

=SUMPRODUCT(--NOT(ISERR(SEARCH("Laptop",A1:A100))))

"Brad" wrote:

> Thanks for taking the time to read my question.
>
> I have a list of computer models and I'd like to have totals at the bottom
> of each kind using a formula.
>
>
> A
> 1 Laptop
> 2 Desktop
> 3 Server
> 4 Laptop
> 5 Desktop
> 6 Desktop
> 7 Laptop
>
> So my formula would look at column A rows 1 to 7
>
> Total Laptops = 3 (calculated value, not static value)
> Total Desktops = 3 (calculated value, not static value)
> Total Servers = 1 (calculated value, not static value)
>
> I was thinking of an array, but I'm not sure how to do that, or if it is the
> correct approach.
>
> Thanks again for your help,
>
> Brad

 
Reply With Quote
 
Brad
Guest
Posts: n/a
 
      29th Aug 2008
Hey that's great!! Better than what I found.

Thanks Duke

Brad

"Duke Carey" wrote:

> Assuming each cell contains JUST the words you show, you should use
>
> =COUNTIF(A1:a7,"Laptop") and repeat for the other 2 types
>
> if the cells could contain characters in addition to "Laptop", etc, then
>
> =SUMPRODUCT(--NOT(ISERR(SEARCH("Laptop",A1:A100))))
>
> "Brad" wrote:
>
> > Thanks for taking the time to read my question.
> >
> > I have a list of computer models and I'd like to have totals at the bottom
> > of each kind using a formula.
> >
> >
> > A
> > 1 Laptop
> > 2 Desktop
> > 3 Server
> > 4 Laptop
> > 5 Desktop
> > 6 Desktop
> > 7 Laptop
> >
> > So my formula would look at column A rows 1 to 7
> >
> > Total Laptops = 3 (calculated value, not static value)
> > Total Desktops = 3 (calculated value, not static value)
> > Total Servers = 1 (calculated value, not static value)
> >
> > I was thinking of an array, but I'm not sure how to do that, or if it is the
> > correct approach.
> >
> > Thanks again for your help,
> >
> > Brad

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count first instance of entry only. J.W. Aldridge Microsoft Excel Discussion 3 23rd Feb 2008 02:22 AM
Looking for a function that will count the first instance of a =?Utf-8?B?aWJ2YWxlbnRpbmU=?= Microsoft Excel Worksheet Functions 6 11th Aug 2007 11:47 AM
Class instance count. Per Forsgren Microsoft VB .NET 3 8th Sep 2004 05:09 PM
String instance count Jon Microsoft VB .NET 10 3rd Oct 2003 04:15 PM
String instance count Jon Microsoft VB .NET 10 3rd Oct 2003 03:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:17 AM.