Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summing Unique data values


I am trying, with no luck to find a formula will sum the amount of times
unique data is in a list, eg range b2:b6 contains

apple
pear
pear
house
apple

Given data is unique cannot check it against a table but would like to
count number of times each instance appears

apple 2
pear 2
house 1

Can this be done without looking up a dataset.

Thanks

SydnTex


--
SydnTex
------------------------------------------------------------------------
SydnTex's Profile: http://www.excelforum.com/member.php...o&userid=36562
View this thread: http://www.excelforum.com/showthread...hreadid=563117

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Summing Unique data values

Have you considered using a Pivot Table?

First, make sure your list has a column heading. I'll assume FRUIT.

Then...
<Data<Pivot Table
Use: Excel
Select your data
Click the [Layout] button

ROW: Drag the FRUIT field here
DATA: Drag the FRUIT field here
If it doesn't list as Count of FRUIT...dbl-click it and set it to Count
Click [OK]
Select where you want the Pivot Table...and you're done!

That will list each Fruit and the count of each instance.

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

XL2002, WinXP


"SydnTex" wrote:


I am trying, with no luck to find a formula will sum the amount of times
unique data is in a list, eg range b2:b6 contains

apple
pear
pear
house
apple

Given data is unique cannot check it against a table but would like to
count number of times each instance appears

apple 2
pear 2
house 1

Can this be done without looking up a dataset.

Thanks

SydnTex


--
SydnTex
------------------------------------------------------------------------
SydnTex's Profile: http://www.excelforum.com/member.php...o&userid=36562
View this thread: http://www.excelforum.com/showthread...hreadid=563117


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summing Unique data values


Thank you, it works a treat.

One more question then on Pivot tables, can i have them automatically
update as the spreadsheet is updated.

I am entering data from a form, could i put a line in the cmdOnClick
function that will force the pivot table to update.


Cheers,

SydnTex


--
SydnTex
------------------------------------------------------------------------
SydnTex's Profile: http://www.excelforum.com/member.php...o&userid=36562
View this thread: http://www.excelforum.com/showthread...hreadid=563117

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 644
Default Summing Unique data values

="Apple = " &COUNTIF(B2:B6,"apple")
Try using CountIF like that.

Die_Another_Day
SydnTex wrote:
I am trying, with no luck to find a formula will sum the amount of times
unique data is in a list, eg range b2:b6 contains

apple
pear
pear
house
apple

Given data is unique cannot check it against a table but would like to
count number of times each instance appears

apple 2
pear 2
house 1

Can this be done without looking up a dataset.

Thanks

SydnTex


--
SydnTex
------------------------------------------------------------------------
SydnTex's Profile: http://www.excelforum.com/member.php...o&userid=36562
View this thread: http://www.excelforum.com/showthread...hreadid=563117


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 860
Default Summing Unique data values

Hi SydnTex,

also look at:

=COUNTIF(B2:B6,"apple")
=COUNTIF(B2:B6,"pear")
=COUNTIF(B2:B6,"house")

HTH
Martin




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summing Unique data values


SydnTex

See the RefreshTable method in VBA help.

BTW...If you don't really need the pivot table refreshed until input is
completed, you many want to associate the refresh with Unload or
Deactivate.

Regards,

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=563117

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summing Unique data values


I am having trouble displaying a list in a combo or list box from data
in the spreadsheet.

data is held in cells A5:A9 and i have the following procedure to fill
the box but it does not add it overwrites the data giving only one
reference, the last.

Do
If IsEmpty(ActiveCell) = False Then
cboSpeakerTopic.Value = ActiveCell.Value
ActiveCell.Offset(1, 0).Select

End If
Loop Until IsEmpty(ActiveCell) = True

How do i get it to add into list rather than overwrite.

Thanks.


--
SydnTex
------------------------------------------------------------------------
SydnTex's Profile: http://www.excelforum.com/member.php...o&userid=36562
View this thread: http://www.excelforum.com/showthread...hreadid=563117

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 644
Default Summing Unique data values

You almost answered your own question.
cboSpeakerTopic.Value = ActiveCell.Value
Should look like this:
cboSpeakerTopic.AddItem pvargitem:=ActiveCell.Value

HTH

Die_Another_Day

SydnTex wrote:
I am having trouble displaying a list in a combo or list box from data
in the spreadsheet.

data is held in cells A5:A9 and i have the following procedure to fill
the box but it does not add it overwrites the data giving only one
reference, the last.

Do
If IsEmpty(ActiveCell) = False Then
cboSpeakerTopic.Value = ActiveCell.Value
ActiveCell.Offset(1, 0).Select

End If
Loop Until IsEmpty(ActiveCell) = True

How do i get it to add into list rather than overwrite.

Thanks.


--
SydnTex
------------------------------------------------------------------------
SydnTex's Profile: http://www.excelforum.com/member.php...o&userid=36562
View this thread: http://www.excelforum.com/showthread...hreadid=563117


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
Equation to refer to data value(s) and not the cell?? [email protected] Excel Discussion (Misc queries) 2 March 10th 06 09:02 AM
How can I average data from a repeating list into a unique list? Duke Carey Excel Worksheet Functions 0 March 3rd 06 06:38 PM
pivot table with selection values not included in the base data confused Charts and Charting in Excel 0 June 21st 05 02:42 PM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
If I have X,Y data how do I sum the Y values using a set of bins based on x values ScottBerger Excel Worksheet Functions 1 November 16th 04 11:48 PM


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