formula too long

C

cencoit

How can I shorten this formula, I still need to add a few more variable
and everytime I try and add one I get the formula is too long error.

Thanks

=IF(AND(A16="DeKalb",D16="Ponch
250"),0)+IF(AND(A16="DeKalb",D16="Cruiser Ext
Pak"),0)+IF(AND(A16="Dekalb",D16="Cruise
CRW"),48)+IF(AND(A16="DeKalb",D16="Ponch
1250"),48)+IF(AND(A16="Asgrow",D16="Ponch
250"),0)+IF(AND(A16="Asgrow",D16="Cruiser Ext
Pak"),0)+IF(AND(A16="Asgrow",D16="Cruise
CRW"),48)+IF(AND(A16="Asgrow",D16="Ponch
1250"),48)+IF(AND(A16="Croplan",D16="Ponch
250"),0)+IF(AND(A16="Croplan",D16="Cruiser Ext
Pak"),0)+IF(AND(A16="Croplan",D16="Cruise
CRW"),48)+IF(AND(A16="Croplan",D16="Ponch
1250"),48)+IF(AND(A16="Northrup King",D16="Ponch
250"),16)+IF(AND(A16="Northrup King",D16="Cruiser Ext
Pak"),16)+IF(AND(A16="Northrup King",D16="Cruise
CRW"),48)+IF(AND(A16="Northrup King",D16="Ponch
1250"),48)+IF(AND(A16="Mycogen",D16="Ponch
250"),16)+IF(AND(A16="Mycogen",D16="Cruiser Ext
Pak"),16)+IF(AND(A16="Mycogen",D16="Cruise
CRW"),48)+IF(AND(A16="Mycogen",D16="Poncho 1250"),48
 
M

Morrigan

See attachment, hope it helps.

How can I shorten this formula, I still need to add a few more variable
and everytime I try and add one I get the formula is too long error.

Thanks

=IF(AND(A16="DeKalb",D16="Ponch
250"),0)+IF(AND(A16="DeKalb",D16="Cruiser Ext
Pak"),0)+IF(AND(A16="Dekalb",D16="Cruise
CRW"),48)+IF(AND(A16="DeKalb",D16="Ponch
1250"),48)+IF(AND(A16="Asgrow",D16="Ponch
250"),0)+IF(AND(A16="Asgrow",D16="Cruiser Ext
Pak"),0)+IF(AND(A16="Asgrow",D16="Cruise
CRW"),48)+IF(AND(A16="Asgrow",D16="Ponch
1250"),48)+IF(AND(A16="Croplan",D16="Ponch
250"),0)+IF(AND(A16="Croplan",D16="Cruiser Ext
Pak"),0)+IF(AND(A16="Croplan",D16="Cruise
CRW"),48)+IF(AND(A16="Croplan",D16="Ponch
1250"),48)+IF(AND(A16="Northrup King",D16="Ponch
250"),16)+IF(AND(A16="Northrup King",D16="Cruiser Ext
Pak"),16)+IF(AND(A16="Northrup King",D16="Cruise
CRW"),48)+IF(AND(A16="Northrup King",D16="Ponch
1250"),48)+IF(AND(A16="Mycogen",D16="Ponch
250"),16)+IF(AND(A16="Mycogen",D16="Cruiser Ext
Pak"),16)+IF(AND(A16="Mycogen",D16="Cruise
CRW"),48)+IF(AND(A16="Mycogen",D16="Poncho 1250"),48

+-------------------------------------------------------------------
|Filename: Match.zip
|Download: http://www.excelforum.com/attachment.php?postid=3839
+-------------------------------------------------------------------
 
G

Guest

The error message is Excel's way of trying to tell you to give up the formula
and use VLOOKUP() instead.


Create a table with the text combinations going down column X and the values
going down column Z:

DeKalbPoncho250 0
....

The formula could then be =VLOOKUP(A16&D16,X1:Z20,2,0)

The advantage of this approach is that to make it 120 combinations instead
of 20 only requires making the table bigger and changing the formula to

=VLOOKUP(A16&D16,X1:Z120,2,0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top