A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

If Function with multiple variables



 
 
Thread Tools Display Modes
  #1  
Old January 28th 08, 10:36 PM posted to microsoft.public.excel.misc
Fritz
external usenet poster
 
Posts: 29
Default If Function with multiple variables

On a worksheet, I am using an If function, but now I need to add a second set
of variables to that If function, how can I accomplish that?
Ads
  #2  
Old January 28th 08, 10:42 PM posted to microsoft.public.excel.misc
Nick Hodge[_2_]
external usenet poster
 
Posts: 186
Default If Function with multiple variables

Fritz

Just nest them. You can go up to 7 levels deep in versions before 2007 (Some
more using range names) but if you need more that that you should really
consider a table and VLOOKUP or similar. the syntax for IF are

=IF(test,
this_value_if_true,IF(test2,this_value_if_true2,th is_value_if_false2))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.excelusergroup.org
web: www.nickhodge.co.uk





"Fritz" > wrote in message
...
> On a worksheet, I am using an If function, but now I need to add a second
> set
> of variables to that If function, how can I accomplish that?


  #3  
Old January 28th 08, 11:33 PM posted to microsoft.public.excel.misc
Fred Smith[_4_]
external usenet poster
 
Posts: 2,389
Default If Function with multiple variables

If both variables need to be true, you can use the And function, as in:

=if(and(a1=1,b1=2),true,false)

If either variable need to be true, you can use the Or function, as in:

=if(or(and=1,b1=2),true,false)

Regards,
Fred

"Fritz" > wrote in message
...
> On a worksheet, I am using an If function, but now I need to add a second
> set
> of variables to that If function, how can I accomplish that?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IF function for multiple variables DaS Excel Worksheet Functions 10 August 24th 07 11:55 PM
Multiple variables-SOS Ang Excel Worksheet Functions 3 April 27th 07 08:24 PM
Index Match function for multiple linked variables Bob Excel Worksheet Functions 13 November 23rd 05 12:56 AM
Index Match function for multiple linked variables Bob Excel Worksheet Functions 0 November 22nd 05 02:12 AM
if function multiple variables cin Excel Worksheet Functions 2 September 8th 05 09:32 PM


All times are GMT +1. The time now is 03:11 AM.


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