Solved

Big huge IF Statement

Posted on 2011-02-17
9
217 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

773 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