Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you terminate an autorecover save operation w/o terminating EX gcanty Excel Discussion (Misc queries) 1 June 18th 08 09:08 PM
excel does not terminate requested task with available resources Mukesh Patel Excel Discussion (Misc queries) 0 February 17th 06 03:17 PM
terminate a form tkaplan Excel Discussion (Misc queries) 5 October 24th 05 01:14 PM
How can you wait for the SHELL command to terminate ? Dave Peterson[_3_] Excel Programming 1 October 1st 03 09:10 AM
Can't terminate the excel instance from VB Gerhard[_2_] Excel Programming 1 July 16th 03 11:06 AM


All times are GMT +1. The time now is 04:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"