Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to terminate a condition (IF) at its first occurance?
I apologize in advance if this is unclear.
I am new to excel, and trying to do a simple formula. In this case, its a nested IF formula like the following... =IF(F3F$2*5,"5",IF(F3F$2*4,"Q",IF(F3F$2*3,"T",I F(F3F$2*2,"D","")))) Basically the column on the left checks the adjacent column on the right to see if its 2, 3 or 4 times more than a fixed value (@ cell F2). If it is, it will stick a label like D(ouble) or T(riple) etc. The problem is, the values on the right keep accending.. and the label is valued as TRUE for all of them.. so I get something like D D D D T T In the left column. My question is, how can I make excel just label the *first occurance* of the doubling and tripling instead of all values that are than double etc. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to terminate a condition (IF) at its first occurance?
You would need to include a countif condition to check if there was a
previous cell containing the candidate later And(F3F$2*3,Countif(E$2:E2,"T")=0) as an example of the kind of condition you set up (assumes the formula is in column E as you appear to describe). you would modify all the conditions in your formula to reflect a similar construct. Then drag fill down the column. -- Regards, Tom Ogilvy "Steve Lim" wrote in message om... I apologize in advance if this is unclear. I am new to excel, and trying to do a simple formula. In this case, its a nested IF formula like the following... =IF(F3F$2*5,"5",IF(F3F$2*4,"Q",IF(F3F$2*3,"T",I F(F3F$2*2,"D","")))) Basically the column on the left checks the adjacent column on the right to see if its 2, 3 or 4 times more than a fixed value (@ cell F2). If it is, it will stick a label like D(ouble) or T(riple) etc. The problem is, the values on the right keep accending.. and the label is valued as TRUE for all of them.. so I get something like D D D D T T In the left column. My question is, how can I make excel just label the *first occurance* of the doubling and tripling instead of all values that are than double etc. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can you terminate an autorecover save operation w/o terminating EX | Excel Discussion (Misc queries) | |||
excel does not terminate requested task with available resources | Excel Discussion (Misc queries) | |||
terminate a form | Excel Discussion (Misc queries) | |||
How can you wait for the SHELL command to terminate ? | Excel Programming | |||
Can't terminate the excel instance from VB | Excel Programming |