Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Other Topics > Computer Technical Help
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-29-2007, 09:49 AM
slimeywater slimeywater is offline
Junior Member
 
Join Date: Apr 2005
Posts: 28
Default excel problem

i have this problem in excel and i believe i need to use vba to overcome it however because i am incompentent in programing i would really appreciate the help of someone
i have a column containing a huge list of numbers
a small example would be the following
2
2
2
6
6
8
8
8
2
2
2
2
2
5
5
i need the column next to it to automatically show how many times each number repeated (not how many times each number appeared in the whole column but how many times the same number occurs repeatedly before a new numbers occurs)
so the result would be
2
2
2 3
6
6 2
8
8
8 3
2
2
2
2
2 5
5
5 2
ie 2 appeared 3 times
then 6 appeared twice
then 8 appeared 3 times
then 2 appeared another 5 times
then 5 appeared twice
it would reall help me if the second column numbers were displayed just as they are above at the end of each sequnce in the next cloumn

if i have been unclear at all please let let me know and i will try to explain with greater clarity

thank you if anyone can help
Reply With Quote
  #2  
Old 09-29-2007, 05:18 PM
BeaucoupFish BeaucoupFish is offline
Senior Member
 
Join Date: Jun 2005
Location: San Francisco
Posts: 723
Default Re: excel problem

If starting data is in A2 (to work, data has to start in row 2 or higher), do the following. No VBA required:

in B2, formula will be "=IF(A2=A3,B1+1,0)", copy down.
in C2, formula will be "=IF(B2=0,B1+1,"")", copy down.

You can hide column B for neatness.
Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 09:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.