?
Solved

Big huge IF Statement

Posted on 2011-02-17
9
Medium Priority
?
221 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
[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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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
 
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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

800 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