LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Multiple IF situations

Sub Test

With ACtivesheet
B25 = .Range("B25").Value
D25 = .Range("D25").Value
E25 = .Range("E25").Value
If B25="Hockey" And D25="English" And E25="Standard" Then
.Range ("F25").Value = "123456789"
ElseIf B25="Soccer" And D25="English" And E25="Standard" Then
.Range ("F25").Value = "abcd"
ElseIf B25="Soccer" And D25="French" And E25="Standard" Then
.Range ("F25").Value = "xyz"
'etc...
End If
End With

End Sub

as an example

--

HTH

RP
(remove nothere from the email address if mailing direct)


"K.W.Martens" wrote in message
...
Thanks for the info, but, how can I do it in VBA.....your comment "this

can
be done easily" intriqued me. Any suggestions would be appreciated.

Another
question....I don't really know if I am looking at a "nesting" situation.
Each circumstance within the cell is determined by the drop down lists.

So,
as an example, instead of "Hockey" in B25, it was "Soccer" it would give a
different result. It seems to me that I have an IF/OR situation.....but,

I
still haven't found an answer.



"Fredrik Wahlgren" wrote:


"K.W.Martens" wrote in message
...
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.


It seems as if you want to do nested IF's. Unfortunately, you can't have
more than 7 If statements in a cell. This can be done easily in VBA. See

the
links below. For more links google Excel nested if

http://www.cpearson.com/excel/nested.htm
http://spreadsheets.about.com/cs/exc...tediffunct.htm

/ Fredrik





 
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
Counting for multiple situations Lisa Excel Worksheet Functions 3 March 22nd 10 07:19 PM
Various dates returned for variable situations, + Steve Excel Worksheet Functions 0 June 9th 09 06:01 PM
Crashes when find is used (and specific situations) Outlook, eh? Excel Discussion (Misc queries) 3 January 23rd 09 02:27 PM
work customizable situations problem jimtmcdaniels Setting up and Configuration of Excel 0 March 28th 07 06:32 AM
conflicitng situations in shared workbook Olivier Excel Discussion (Misc queries) 0 April 26th 06 10:49 AM


All times are GMT +1. The time now is 06:32 PM.

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

About Us

"It's about Microsoft Excel"