Solved

if statement "m2" or "lm"- excel 2010

Posted on 2013-05-09
6
234 Views
Last Modified: 2013-05-21
hi experts, id like some help with the following formula

=if(or(c12=c6,c12=c7),"m2",if(c12=c8,c12=c9,c12=c10,c12=c11),"lm",""))

basically if c12= c6 or c7 then show "m2" and if c12 = c8, c9, c10 or c11 then show "lm"
0
Comment
Question by:Frank .S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 81

Assisted Solution

by:byundt
byundt earned 110 total points
ID: 39154454
=IFERROR(IF(MATCH(C12,C6:C11,0)<3,"m2","lm"),"")
0
 

Author Comment

by:Frank .S
ID: 39154514
hi byundt, i tried this formula but it did not work
0
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 165 total points
ID: 39154531
=if(or(c12=c6,c12=c7),"m2",if(or(c12=c8,c12=c9,c12=c10,c12=c11),"lm",""))
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 39154828
What result did you get with Brad's (byundt) formula? I can't see how it would not work for what you describe - unless your excel version is actually 2003 or earlier?
0
 
LVL 81

Expert Comment

by:byundt
ID: 39155045
Please post a sample workbook that demonstrates the formula not working.
0
 
LVL 10

Expert Comment

by:mark_harris231
ID: 39155172
Agree with byundt and rorya - byundt's solution should work.

Points to byundt please, but I did want to post an alternative using the CHOOSE function that might be useful when the criteria set is greater than two conditions:

- if C12= C6, then "m2"
- if C12=C7, then "q9"
- if C12 = C8, then "lm"
- if C12 = C9, then "lmno"
- if C12 = C10 or C11, then "xyz"

=CHOOSE(MATCH(C12,C6:C11,0),"m2","q9","lm","lmno","xyz","xyz")

This is the equivalent of the CASE function in other programming languages.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question