View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Need Excel 2003 Programming help...

Addressing the 7 nested IF statement limit, there is a work-around that will
give virtually limitless nested IFs. Warning: trying to follow the logic in
these MegaFormulas may lead to insanity. Consider the formula that Ardus
offered you:

=IF(OR(I1="NS",I1="WIP"),H1&I1,IF(J1="Y",IF(H1="CA ","CRRCVD","RORDY"),H1&"CMPD"))

There are only 3 nested IFs here, but as you know, you could have up to 4
more. Now you name the formula as you would name a range of cells.
Insert/Name/Define. Put your formula in the Refers To: box, give it a name
at the top like Formula1 and click ADD. Do this for other formulas as well
so you have formula names refering to multi IF statements.
In the worksheet you use the formula names in other formulas. The Name is
considered as only one argument in a cell formula, even though it refers to
many arguments. ie = IF(formula1, formula2, formula3). If each named formula
had 7 nested IFs, then this workbook formula would be evaluating 21 IF
statements. Now re-read the warning at the beginning :)

Mike F

"Sriram" wrote in message
...
Dear Friends,

I know VB programming & also knew that excel macro includes VB codes. But
I
don't know how to select cells ad how to check a data in a particular cell
and inputing a data to another cell w.r.f to the checking cell.

I'm using excel 2003.

Example:

A B C D E F G H I J K L M N
O
1 - - - - - - - CA NS N - - -
CANS
2 - - - - - - - CA WIP N - - -
CAWIP
3 - - - - - - - CA C N - - -
CACMPD
4 - - - - - - - CA C Y - - -
CRRCVD
5 - - - - - - - RO NS N - - -
RONS
6 - - - - - - - RO C N - - -
ROCMPD
7 - - - - - - - RO C Y - - -
RORDY

We are doing telecom cell site project. Let me explain about the sheet
snap
i mentioned above.

H column states the acceptance status of the site. This will have 3 status
viz. C - Cleared, CA - Conditionally Accepted, RO - Reoffered.
I column states the Pending jobs status. This will contain 3 status NS -
Not
Started, WIP - Work In Progress, C - Completed.
J column states Ready for Reoffer or Compliance Report received.This will
2
status Yes or No.

Now the scenario is that if the site has been Cleared, then no issues.

If the site is CA, then the pending job has to be compelted and a
Complaince
Report to be submitted stating that the pending job are done.

If the site is RO, then pending jobs to be completed and it has to be
reoffered for another visit to client.

If H = C, then no chekcking, direclty putting N = Cleared.
If H = CA and I = NS, then O = CANS, that means site is Conditionally
Accepted and pending job clearance Not Started yet.
If H = CA and I = WIP, then O = CAWIP, means pending jobs clearance Work
In
Progress.
If H = CA and I = C, then O=CACMPD, means site is CA and pending jobs
Completd.
If H = CA and I = C and J = Y then o = CRRCVD, means Compliance Report
received.

Same case for H = RO,except the last one if H = RO and I = C and J = Y,
then
O = RORDY.

I have done this with nested IF formula but it supports till 7 if
conditions
only.

So, kindly anybody help me out by giving some tips how to select the cells
and it s values in a particular sheet or somethign like this.

If you are unable to understand what I want to say then feel free to
contact
me on my emil id . I'll email you the worksheet
itself.

Thanks in advance
Sriram