- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- several condition in Excel
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2004 01:06 AM
04-08-2004 01:06 AM
several condition in Excel
I'm really dumb with Excel. How do write the equivalent of this in Excel :
if (cell=value1) or (cell=value2) or (cell=value3)
then cell2=new_value
else cell2=default_value
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2004 02:24 AM
04-08-2004 02:24 AM
Re: several condition in Excel
=IF(logical_test,value_if_true,value_if_false)
What that means, simply put, is this:
=IF("if the condition stated here is true", then enter "this value, else enter "this value")
A practical example would be a spreadsheet containing exam marks for students. Perhaps you wanted to see at a glance who had failed and who had passed. An IF function would be perfect for this. Let's assume the marks are in column B, starting from row 4. Our formula would look like this:
=IF(B4>50, "Pass", "Fail")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2004 02:25 AM
04-08-2004 02:25 AM
Re: several condition in Excel
Copy the below formula to Cell2 (in your question). I have assumed that cell = A2 in my formula.. u can change it to your actual cell number..
=IF(OR(A2=1,A2=2,A2=3),4,0)
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2004 02:27 AM
04-08-2004 02:27 AM
Re: several condition in Excel
value1=1
value2=2
value3=3
new_value=4
default_value=0
Just in case u need a different value.. u can change in the formula..
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2004 02:29 AM
04-08-2004 02:29 AM
Re: several condition in Excel
Nested IF functions are a simple way to do a complex conditional formula. Nested IF functions allow you to use up to seven IF functions to impose conditions.
Essentially, the way a nested if statement would work is like this:
=IF("if this condition stated here is true", then enter "this value, else if("if this condition stated here is true", then enter "this value, else enter"this value"))
HTH
Bruno
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2004 02:36 AM
04-08-2004 02:36 AM
Re: several condition in Excel
So there are no instruction like case or switch in the Excel syntax ?
Another question, the && and || operator cannot be used ?
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2004 02:52 AM
04-08-2004 02:52 AM
Re: several condition in Excel
&& and || cannot be used in excel
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2004 02:58 AM
04-08-2004 02:58 AM
Re: several condition in Excel
If you know like behavior, you can also define of the functions personalized.
Bruno