Solved

Conditional Formatting with Excel - Part 6

Posted on 2011-03-13
16
228 Views
Last Modified: 2012-05-11
Hi Experts,

Hopefully, I'll be done with conditional formatting after this request.

I've trying to conditionally format cells A2 through to A200 to highlight when a certain condition occurs(please see attached). Unfortunately, there is an error in my formulas.

I've tried both of the following:

=AND(F2<C2,J2<G2,G2<C2,J2<F2,G2>F2,N2<K2,K2<G2,N2<J2,K2>J2,R2>O2,(R2-O2>(P2-R2),(O2-Q2)>(R2-O2)*1.5),V2>S2,V2>R2,S2>O2,S2>K2)

=AND(F2<C2),(J2<G2,G2<C2,J2<F2,G2>F2),(N2<K2,K2<G2,N2<J2,K2>J2),(R2>O2,(R2-O2)>(P2-R2),(O2-Q2)>(R2-O2)*1.5),(V2>S2,V2>R2,S2>O2,S2>K2)

But I keep on getting error message with my formula.

I wonder if an expert could take a look and let me know where I might be going wrong

Cheers

Carlotn
Hammerv2.xlsm
0
Comment
Question by:cpatte7372
16 Comments
 
LVL 24

Expert Comment

by:StephenJR
ID: 35121698
Do these do the right thing? You had some missing (as well as superfluous) brackets.

=AND(F2<C2,J2<G2,G2<C2,J2<F2,G2>F2,N2<K2,K2<G2,N2<J2,K2>J2,R2>O2,(R2-O2)>(P2-R2),((O2-Q2)>(R2-O2)*1.5),V2>S2,V2>R2,S2>O2,S2>K2)

=AND(F2<C2,J2<G2,G2<C2,J2<F2,G2>F2,N2<K2,K2<G2,N2<J2,K2>J2,R2>O2,(R2-O2)>(P2-R2),((O2-Q2)>(R2-O2)*1.5),V2>S2,V2>R2,S2>O2,S2>K2)
0
 

Author Comment

by:cpatte7372
ID: 35121726
Stephen,

Thanks for responding, I'm going to check it now...
0
 

Author Comment

by:cpatte7372
ID: 35121788
Stephen,

Unfortunately it doesn't work.

I appreciate that my formula is probably incorrect. However, what I'm trying to do with this formula is calculate each bracketed area seperately. Does that make sense?

=AND(F2<C2),(J2<G2,G2<C2,J2<F2,G2>F2),(N2<K2,K2<G2,N2<J2,K2>J2),((R2>O2,(R2-O2)>(P2-R2),(O2-Q2)>(R2-O2)*1.5)),(V2>S2,V2>R2,S2>O2,S2>K2)


Cheers
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 35121797
I don't that brackets will make any difference with AND. I think

AND(1>2,(2>3,3>4))

is the same as

AND(1>2,2>3,3>4)

because as soon as single statement is False the whole statement will evaluate to False.

Perhaps you need OR? Can you explain what you are trying to do?
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35121844
What do you mean "calculate each bracketed area separately"?

Within an AND function every condition needs to be TRUE for the whole thing to be TRUE, so if you have

=AND(A1>B1,D1>E1,X1>Y1)

that means that the result is only TRUE if each of the 3 conditions is TRUE

regards, barry

0
 

Author Comment

by:cpatte7372
ID: 35121938
OK,

Give me second I will show what your formula produces....
0
 

Author Comment

by:cpatte7372
ID: 35121995
Ok,

One of the conditions is that the value in cell J should be lower than the cell value in cell G. However if you look at cell J151, its higher than cell G151, yet I get a positive condition a highlighted in cell A151.


Hammerv3.xlsm
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 24

Expert Comment

by:StephenJR
ID: 35122025
I think the CF is coming from your other condition.
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 35122046
I'm guessing that may be a mistake as it only seems to apply to row 151 alone.
0
 

Author Comment

by:cpatte7372
ID: 35122110
Stephen,

I think you might be right. I need to run the conditional on different numbers. I'm going to check it out on different data now.

In meantime, can you see any reason why this formula doesn't work?

=AND(H2<D2,L2<H2,R2>O2,(R2>O2,(R2-O2)>(P2-R2),(O2-Q2)>(R2-O2)*1.5)

Cheers
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 35122141
Not sure, what you mean by not work? Not produce the expected result or produce an error?

As we were saying above, this could be simplified to:

=AND(H2<D2,L2<H2,R2>O2,(R2-O2)>(P2-R2),(O2-Q2)>(R2-O2)*1.5)
0
 

Author Comment

by:cpatte7372
ID: 35122153
Stephen

I meant to say can you see any reason why the following formula won't work:

=AND(H2<D2,L2<H2,(R2>O2,(R2-O2)>(P2-R2),(O2-Q2)>(R2-O2)*1.5)

Cheers
0
 
LVL 24

Accepted Solution

by:
StephenJR earned 500 total points
ID: 35122168
Try this, one too many left brackets:

=AND(H2<D2,L2<H2,R2>O2,(R2-O2)>(P2-R2),(O2-Q2)>(R2-O2)*1.5)
0
 

Author Comment

by:cpatte7372
ID: 35122804
Stephen,

That worked. Cheers mate.
0
 
LVL 24

Expert Comment

by:broomee9
ID: 35357011
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
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 will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

746 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

10 Experts available now in Live!

Get 1:1 Help Now