Previous in Forum: Vanishing E-Mails in Outlook Express   Next in Forum: c++
Close
Close
Close
5 comments
Rate Comments: Nested
Active Contributor

Join Date: Oct 2006
Location: Windsor On Canada
Posts: 24

Excel Function

12/05/2007 4:35 PM

I am trying to input an excel funtion which will allow me to have a desired cell output the following

LOW if 3<x<10

Medium if 10<x<30

High if 30<x<100

Can anyone help?

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Guru

Join Date: Sep 2007
Location: Reno, NV (USA)
Posts: 608
Good Answers: 66
#1

Re: Excel Function

12/05/2007 5:07 PM

This should do it:

=IF(A1>100,"Out of Range",IF(A1>30,"HIGH",IF(A1>10,"MED",IF(A1>3,"LOW","Out of Range"))))

Let me know if you have problems.

__________________
Aequam memento rebus in arduis servare mentem.
Register to Reply
Commentator
United States - Member - Woohoo Engineering Fields - Mechanical Engineering - New Member

Join Date: Aug 2005
Location: Greer, SC, USA
Posts: 73
Good Answers: 1
#2

Re: Excel

12/05/2007 5:08 PM

If your data is in column A then you can paste the following formula where you want the words to appear. An alternative would be to use conditional formatting (Format-Conditional Formatting) and make the actual cells with the values or the text be green or red or what ever color you want.

=IF(AND(3<A1,A1<10),"LOW",IF(AND(10&amp;amp;lt;A1,A1<30),"Medium",IF(AND(30<A1,A1<100),"HIGH","")))

PS. I keep previewing this and it scews up my less than signs --i.e. 10<A1. Try fixing it yourself in Excel and it should work.

__________________
Self-motivational quote: "If they can make penicillin out of moldy bread, they can sure make something out of you." -- Muhammad Ali
Register to Reply
Active Contributor

Join Date: Oct 2006
Location: Windsor On Canada
Posts: 24
#3

Re: Excel Function

12/05/2007 5:28 PM

Gentelman,

It worked great

I really appreciate your help. Thanks you, and I hope you have a great holiday season.

Take care

Register to Reply
Guru
Philippines - Member - New Member Engineering Fields - Instrumentation Engineering - New Member Engineering Fields - Control Engineering - Who am I?

Join Date: Oct 2006
Location: Northern Mindanao, Philippines
Posts: 2147
Good Answers: 53
#4

Re: Excel Function

12/06/2007 5:40 AM

I don't know if you've tried this but it's a nice touch:

Select Format/Conditional Formatting.

You'll get a dialog box where you can have the cell change format (change color, font, font color, bold, italic, change borders, etc). You can add up to three format changes. In your case you can select, for example:

  • If cell value is between 3 and 10, the cell color is green, font is black, Arial, normal.
  • If cell value is between 10 and 30, the cell color is yellow, font is black, Times New Roman, normal.
  • If cell value is between 30 and 100, the cell color is red, font is white, Verdana, bold.

I did this for my process monitor at my office. It allows me to watch the different processes around the plant from my office (but not control them), and the color changes instantly alerts me to alarm conditions or changes in the process step. I called it Cheap_HMI.xls. That's right, it's an HMI that uses Excel.

__________________
Miscommunication: when what people heard you say differs from what you said. Make yourself understood.
Register to Reply Score 1 for Good Answer
Active Contributor

Join Date: Oct 2006
Location: Windsor On Canada
Posts: 24
#5
In reply to #4

Re: Excel Function

12/06/2007 10:41 AM

That worked great....thanks

Register to Reply
Register to Reply 5 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

CSM Engineer (1); Nate (1); PeterR (2); Vulcan (1)

Previous in Forum: Vanishing E-Mails in Outlook Express   Next in Forum: c++

Advertisement