![]() |
|
|
|||||||
| FlashChat | Actuarial Discussion | Preliminary Exams | CAS/SOA Exams | Cyberchat | Around the World | Suggestions |
Berlin - Madrid - Rome
- Paris - Hamburg - Warsaw |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
=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. |
|
#3
|
||||
|
||||
|
IF(OR(SUMPRODUCT(--(A2:C2>0))=0,SUMPRODUCT(--(A2:C2>0))=3),1,2)
__________________
def no_one(the_spanish_inquisition): **** Juan. |
|
#4
|
||||
|
||||
|
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
__________________
|
|
#5
|
||||
|
||||
|
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. |
|
#6
|
||||
|
||||
|
Quote:
![]() ETA: NM, you did A1-C1 as the range instead of A1-A3
__________________
|
|
#7
|
|||
|
|||
|
=IF(COUNTIF(A1:A3,">=0")*COUNTIF(A1:A3,"<0")=0,1,2 )
|
|
#8
|
||||
|
||||
|
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 |
|
#9
|
||||
|
||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|