Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Increasing number of arguments in an IF statement

Status
Not open for further replies.

Airbiskit

Technical User
May 20, 2003
89
GB
Hi,

Can the amount of arguments in an IF statement be increased or do you know a work around? I have this IF Statement that I need to add a few more arguements to.

=IF((AND(N230="WD",G230>=0,J230<=6,K230<=6,J230<>0)),K230,
(IF((AND(N230="WD",G230=0,K230>6)),6,
(IF((AND(N230="WD",G230>=22,J230<=23.99,K230<=2)),K230,
(IF((AND(M230="Saturda",G230>=0,J230<=6,K230<=6)),K230,
(IF((AND(M230="Saturda",G230>=12,J230<=23.99,J230<>0,K230<=12)),K230,
(IF((AND(M230="Saturda",G230>=12,J230=0,K230<=12)),K230,
(IF((AND(M230="Sunday ")),K230,"N/A")))))))))))))

Thanks

Steve
 
Thanks Arthur for you reply I have started to work though changing each argument but need help with something.

In the argument below the True value is taken from the row cell in column K, how do I change the statement below to point to the row cell from column K going down the spreadsheet?

=IF((AND(Sheet1!N1:N8000="WD",Sheet1!G1:G8000>=0,Sheet1!J1:J8000<=6,Sheet1!K1:K8000<=6,J1:J8000<>0)),K4,
 
Each cell would need its own formula for different cell entries (K4, K5, K6 etc), so why not drag down the forumla ensuring that the ranges are absolute entries (by adding "$" symbols in front of the letters and cell numbers):

=IF((AND(Sheet1!$N$1:$N$8000="WD",Sheet1!$G$1:$G$8000>=0,Sheet1!$J$1:$J$8000<=6,Sheet1!$K$1:$K$8000<=6,$J$1:$J$8000<>0)),K4,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top