Actuarial Outpost
 
Go Back   Actuarial Outpost > Cyberchat > Non-Actuarial Topics
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions

Berlin - Madrid - Rome - Paris - Hamburg - Warsaw
Barcelona - Vienna - Milan - Munich - Prague - Cologne
Actuarial Jobs in Europe
Athens - Amsterdam - Frankfurt - Copenhagen
Hannover - Dublin - Brussels - Lyon - Zurich


Reply
 
Thread Tools Display Modes
  #1  
Old 05-04-2012, 10:27 AM
Smart Actuary's Avatar
Smart Actuary Smart Actuary is offline
Member
 
Join Date: Sep 2011
Posts: 7,795
Default treat for excel geeks

solve my problem and make your day:

i have 3 rows of numbers.

if all numbers in a column have same sign, i want to flag it 1, if 2 have same sign flag 2.

write me a formula to do that.

your welcome?
__________________
I've always had a problem with the average macho man; they've always been a threat to me - Kurt Cobain
Reply With Quote
  #2  
Old 05-04-2012, 10:32 AM
vividox's Avatar
vividox vividox is offline
Lead Guitarist
 
Join Date: Dec 2008
Favorite beer: Saison-Brett
Posts: 44,235
Default

=IF(OR(AND(A1>0,A2>0,A3>0),AND(A1<0,A2<0,A3<0)),1, 2)

Put that in the fourth row and drag across the row.
__________________
This post was crafted using a special blend of herbs and sarcasm.
Reply With Quote
  #3  
Old 05-04-2012, 10:34 AM
ADoubleDot's Avatar
ADoubleDot ADoubleDot is offline
Member
 
Join Date: Nov 2007
Location: Slightly Dusty South
Studying for the rest of my life
Posts: 35,609
Default

IF(OR(SUMPRODUCT(--(A2:C2>0))=0,SUMPRODUCT(--(A2:C2>0))=3),1,2)
__________________
def no_one(the_spanish_inquisition):

**** Juan.
Reply With Quote
  #4  
Old 05-04-2012, 10:34 AM
V1per41's Avatar
V1per41 V1per41 is offline
Member
SOA
 
Join Date: Apr 2010
Location: Colorado
Studying for job inteviews
College: Purdue University Alumni
Favorite beer: Easy Street Wheat
Posts: 1,676
Default

Little verbose:

=IF(A1<0,IF(A2<0,IF(A3<0,1,2),2),IF(A2>0,IF(A3>0,1 ,2),2))

Not sure what you wanted to do if they equal zero
__________________
1/P 2/FM MFE MLC C
Reply With Quote
  #5  
Old 05-04-2012, 10:34 AM
ADoubleDot's Avatar
ADoubleDot ADoubleDot is offline
Member
 
Join Date: Nov 2007
Location: Slightly Dusty South
Studying for the rest of my life
Posts: 35,609
Default

damn, too slow. mine is more better though

spent too long trying to figure out how to do it without the OR.
__________________
def no_one(the_spanish_inquisition):

**** Juan.
Reply With Quote
  #6  
Old 05-04-2012, 10:38 AM
V1per41's Avatar
V1per41 V1per41 is offline
Member
SOA
 
Join Date: Apr 2010
Location: Colorado
Studying for job inteviews
College: Purdue University Alumni
Favorite beer: Easy Street Wheat
Posts: 1,676
Default

Quote:
Originally Posted by ADoubleDot View Post
damn, too slow. mine is more better though

spent too long trying to figure out how to do it without the OR.
When I plug yours in, I got 2 for all of them.

ETA: NM, you did A1-C1 as the range instead of A1-A3
__________________
1/P 2/FM MFE MLC C
Reply With Quote
  #7  
Old 05-04-2012, 10:38 AM
stilts3 stilts3 is offline
Member
 
Join Date: Nov 2004
Posts: 124
Default

=IF(COUNTIF(A1:A3,">=0")*COUNTIF(A1:A3,"<0")=0,1,2 )
Reply With Quote
  #8  
Old 05-04-2012, 10:38 AM
Smart Actuary's Avatar
Smart Actuary Smart Actuary is offline
Member
 
Join Date: Sep 2011
Posts: 7,795
Default

i used vivi's but also want to see how adoubledots' work. be back with report.

Thanks guys.
__________________
I've always had a problem with the average macho man; they've always been a threat to me - Kurt Cobain
Reply With Quote
  #9  
Old 05-04-2012, 10:38 AM
ADoubleDot's Avatar
ADoubleDot ADoubleDot is offline
Member
 
Join Date: Nov 2007
Location: Slightly Dusty South
Studying for the rest of my life
Posts: 35,609
Default

oh, i did it for columns of numbers instead of rows

fixed: IF(OR(SUMPRODUCT(--(B1:B3>0))=0,SUMPRODUCT(--(B1:B3>0))=3),1,2)
__________________
def no_one(the_spanish_inquisition):

**** Juan.
Reply With Quote
  #10  
Old 05-04-2012, 10:39 AM
Baby, ByeBye's Avatar
Baby, ByeBye Baby, ByeBye is offline
Member
CAS
 
Join Date: Jan 2012
Location: your mom
Posts: 14,091
Default

drones
Reply With Quote
Reply

Thread Tools
Display Modes

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


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


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.22516 seconds with 7 queries