Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / April 2008

Tip: Looking for answers? Try searching our database.

Urgent Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kiran - 26 Apr 2008 10:11 GMT
Hi All,
I want a macro to given formula -

=IF(AND(A2="IncidentLow",B2<=168),"Pass",
IF(AND(A2="IncidentMedium",B2<=24),"Pass",
IF(AND(A2="IncidentHigh",B2<=8),"Pass",
IF(AND(A2="IncidentUrgent",B2<=4),"Pass",
IF(AND(A2="RequestLow",B2<=600),"Pass",
IF(AND(A2="RequestMedium",B2<=120),"Pass",
IF(AND(A2="RequestHigh",B2<=40),"Pass")))))))

Pls help

TIA
Greg Wilson - 27 Apr 2008 05:03 GMT
I don't know why you want a macro to do this. Presumably you just want to
simplify it with a UDF. Suggested simplified array formula follows instead.
For this example, you enter the criteria in cell ranges instead of hard
coding them into the formula. This makes it easier to edit the values and
simplifies the formula.

In cells J1:J7 enter:

IncidentLow
IncidentMedium
IncidentHigh
IncidentUrgent
RequestLow
RequestMedium
RequestHigh

In cells K1:K7 enter:

168
24
8
4
600
120
40

In the desired cell enter the following array formula. Commit with
Ctrl+Shift+Enter instead of just Enter:

=IF(SUM((A2=J1:J7)*(B2<=K1:K7)), "Pass", "Fail")

Greg
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.