View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fredrik Wahlgren Fredrik Wahlgren is offline
external usenet poster
 
Posts: 339
Default Multiple IF situations

Excellent. I hope you had some fun while doing so. This is more readable and
far less error prone.

/Fredrik

"K.W.Martens" wrote in message
...
SOLVED....

Thanks to everyone, I have managed to figure it out using VBA....sample

code:
Function upccaculator(games, languages, advertising)
Select Case games
Case "Soccer"
Select Case languages
Case "English"
Select Case advertising
Case "Standard"
upccode = "873794000217"
Case "Custom"
upccode = "Custom"
End Select
Case "French"
Select Case advertising
Case "Standard"
upccode = "873794000248"
Case "Custom"
upccode = "Custom"
End Select
Case "Spanish"
Select Case advertising
Case "Standard"
upccode = "873794000224"
Case "Custom"
upccode = "Custom"
End Select
End Select

.....so forth..........................

It works



"K.W.Martens" wrote:

I'm stumped....What I and trying to do is set up multple IF situations

from
drop down lists. As an example:

=IF(AND(B25="Hockey",D25="English",E25="Standard") ,"123456789","Special")...
now
I want to say the IF it different it will be this, but IF it's different
again it will be this...and so on. I have already 48 circumstances. If

I
knew VB, I'm sure there is a more realistic way to do this.

Any assistance will be greatly appreciated.