REVscene - Vancouver Automotive Forum


Welcome to the REVscene Automotive Forum forums.

Registration is Free!You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! The banners on the left side and below do not show for registered users!

If you have any problems with the registration process or your account login, please contact contact us.


Go Back   REVscene Automotive Forum > Vancouver LifeStyles (VLS) > Gaming, Computer Tech & Electronics

Gaming, Computer Tech & Electronics Fortnite.CounterStrike.CallOfDuty.Dota.MineCraft.
Tips & tricks, tech support, home theatre, online gaming, reviews, latest news...

Reply
 
Thread Tools
Old 09-28-2012, 07:34 PM   #1
Where's my RS Christmas Lobster?!
 
westcoastgsr's Avatar
 
Join Date: May 2001
Location: richmond
Posts: 867
Thanked 38 Times in 19 Posts
Failed 1 Time in 1 Post
Excel help please

Working on a work project and Im having problems with a formula. If i have 2 columns name and another with result I want to set up a formula to show the amount of times in a row someone gets.

Sample:
Name Result
bob Yes
bob no
bob no
bob no
bob yes
bob maybe
bob no
bob no
ted no
ted no
ted yes
ted no
ted no

So assumeing I have different names too but only 3 results I would want the fomula to show Bob had no 3 times in a row once and no 2 times in a row once. Ted got no 2 times in a row twice.

Fuck I hate when I forget how to do things in University. All help is appreciated of course!!!
Advertisement
westcoastgsr is offline   Reply With Quote
Old 09-29-2012, 07:49 AM   #2
I don't like cheese but I love milk!
 
Ferra's Avatar
 
Join Date: Nov 2002
Location: Van
Posts: 1,980
Thanked 895 Times in 243 Posts
Failed 105 Times in 49 Posts
Do you need the output in a particular way? if not you can probably do something like this (assuming names are sorted /separated)
C3 =IF(B3="N", IF(C2>=1, IF(B2=B3, C2+1, 0), IF(B2=B3, 2, 0)), 0)

Col A = Name
Col B = Result
Col C = Formula
Values start row 2, formula starts at row 3

Quote:
So assumeing I have different names too but only 3 results I would want the fomula to show Bob had no 3 times in a row once and no 2 times in a row once. Ted got no 2 times in a row twice.
You can probably use a pivot table to sort and display the tables results...i.e. showing how many 2/3/4 in a rows total sum counts
Ferra is offline   Reply With Quote
This post thanked by:
Old 09-29-2012, 05:25 PM   #3
Where's my RS Christmas Lobster?!
 
westcoastgsr's Avatar
 
Join Date: May 2001
Location: richmond
Posts: 867
Thanked 38 Times in 19 Posts
Failed 1 Time in 1 Post
Thanks the formula works. But the names are not sperated but they are sorted alphabetically. So the problem is the results blend together. For example:

Bob n
Bob n
Bob n
Ted n
Ted n

Then it say there was 4 in a row.

Last edited by westcoastgsr; 09-29-2012 at 05:31 PM.
westcoastgsr is offline   Reply With Quote
Old 10-01-2012, 06:49 AM   #4
I don't like cheese but I love milk!
 
Ferra's Avatar
 
Join Date: Nov 2002
Location: Van
Posts: 1,980
Thanked 895 Times in 243 Posts
Failed 105 Times in 49 Posts
Quote:
Originally Posted by westcoastgsr View Post
Thanks the formula works. But the names are not sperated but they are sorted alphabetically. So the problem is the results blend together. For example:

Bob n
Bob n
Bob n
Ted n
Ted n

Then it say there was 4 in a row.
you can add another "if (A2=A3, x, 0) function infront of the formula
> C3 = IF(A2=A3, IF(B3="N", IF(C2>=1, IF(B2=B3, C2+1, 0), IF(B2=B3, 2, 0)), 0), 0)

Btw..just notice the formula I posted is "cumulative" (i.e. if you miss 4 in a row, it will show both 2, 3, and 4 in the results)
depending on how you want your result....you might need to add another function or another column to take out the cumulative results.
Ferra is offline   Reply With Quote
Reply

Thread Tools

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



All times are GMT -8. The time now is 09:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
SEO by vBSEO ©2011, Crawlability, Inc.
Revscene.net cannot be held accountable for the actions of its members nor does the opinions of the members represent that of Revscene.net