Solved

Big huge IF Statement

Posted on 2011-02-17
9
215 Views
Last Modified: 2012-06-22
Hi,

I have a big IF Statement (As below) I need to bring an extra condition in but am not sure how.

I need the extra condition to be : IF AT2 ="New Break requires investigation (1-3 day),""

AP2 = "New Break requires investigation (1-3 day)"

My current conditions are IF are below

Thanks!

Seamus

=IF(OR(TRIM(SUBSTITUTE(AP2,CHAR(160),""))="Fidessa Booking instructed, Awaiting Sophis Booking",TRIM(SUBSTITUTE(AP2,CHAR(160),""))="Re - Allocated to different Source code",TRIM(SUBSTITUTE(AP2,CHAR(160),""))="No Narrative Provided",TRIM(SUBSTITUTE(AP2,CHAR(160),""))="Open Investigation",TRIM(SUBSTITUTE(AP2,CHAR(160),""))="fidessa booking to be made",TRIM(SUBSTITUTE(AP2,CHAR(160),""))="Corporate Actions Booking Adjustment required",TRIM(SUBSTITUTE(AP2,CHAR(160),""))="Paris being involved in resolution",TRIM(SUBSTITUTE(AP2,CHAR(160),""))="New break requires investigatation (1 - 3 day)"),TRIM(SUBSTITUTE(AP2,CHAR(160),"")), "No Narrative Provided")



0
Comment
Question by:Seamus2626
  • 4
  • 3
  • 2
9 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34917027
I don't understand your new condition.

Incidentally, if you added another column to clean up column AP, your formula could be a lot shorter!
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34917063
Hello Seamus,

Can you specify the new condition in words - it looks like you are saying that if AT2 is the same as that text then AP2 should be blank is that right? Does that take precedence over the existing formula, e.g. should AT2 be checked fiirst and that part actioned, or would you check the formula first.

That's the problem with IFs......if the conditions aren't mutually exclusive you need to specify the pririty order.

 regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34917118
You could shorten the existing formula even without any other cells, i.e.

=IF(OR(TRIM(SUBSTITUTE(AP2,CHAR(160),""))={"Fidessa Booking instructed, Awaiting Sophis Booking","Re - Allocated to different Source code","No Narrative Provided","Open Investigation","fidessa booking to be made","Corporate Actions Booking Adjustment required","Paris being involved in resolution","New break requires investigatation (1 - 3 day)"}),TRIM(SUBSTITUTE(AP2,CHAR(160),"")), "No Narrative Provided")

but I'm still unsure how you want to add the extra bit......

regards, barry
0
 

Author Comment

by:Seamus2626
ID: 34917135
Thanks guys, this IF does have prirority and it is

(1) IF AT2 ="New Break requires investigation (1-3 day),""  then

AP2 = New Break requires investigation (1-3 day)

Then (2)

The IF Statement

Thanks
Seamus
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34917158
I still don't follow. You can't assign a value to AP2 from a formula in a different cell.
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34917171
...but AP2 is the cell that the original formula references - you can't change AP2 by formula unless that formula is in AP2 ....and you already have data in there.

Where does the huge formula reside now?

regards, barry
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 34917241
My best guess would be this

=IF(AT2 ="New Break requires investigation (1-3 day)",AT2,IF(OR(TRIM(SUBSTITUTE(AP2,CHAR(160),""))={"Fidessa Booking instructed, Awaiting Sophis Booking","Re - Allocated to different Source code","No Narrative Provided","Open Investigation","fidessa booking to be made","Corporate Actions Booking Adjustment required","Paris being involved in resolution","New break requires investigatation (1 - 3 day)"}),TRIM(SUBSTITUTE(AP2,CHAR(160),"")), "No Narrative Provided"))

That will return the value of AT2 if AT2 = "New Break requires investigation (1-3 day)", otherwise the original formula runs

regards, barry
0
 

Author Comment

by:Seamus2626
ID: 34917249
Oh shit ive noticed im saying AP2, feck, the Big IF Statement is in A02

AP is a Trim and Find formula
AT is an IF statement formula

So in the IF in AO2, it needs to use AT2 as preference, if AT2 is blank, then move back to the big IF!

Sorry!
0
 

Author Closing Comment

by:Seamus2626
ID: 34917447
You guessed right!! Thanks
Seamus
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now