#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Urgent Help

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Urgent Help

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TOP Urgent Omarbitar Excel Discussion (Misc queries) 1 March 2nd 11 03:03 PM
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
Urgent-Urgent VBA LOOP Jeff Excel Discussion (Misc queries) 0 October 6th 05 05:46 PM
Macro help urgent urgent Dave Peterson[_3_] Excel Programming 0 September 4th 03 03:59 PM
Macro help urgent urgent chandra Excel Programming 0 September 4th 03 03:50 PM


All times are GMT +1. The time now is 02:38 PM.

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

About Us

"It's about Microsoft Excel"