Complex conditional formatting (non-vba preferred)

Pecan

Board Regular
Joined
Jan 13, 2011
Messages
68
Hello all,

I'm attempting to apply conditional formatting to a range of cells in a worksheet, and have been unable to determine the correct combination of functions that provides the desired results. Hopefully I’ve got everything covered here, so we don’t have to do a lot of back and forth getting the desired results.

What I have is an EXCEL 2010 worksheet that helps with estimating hours and costs for a project, and below are descriptions of the columns and the parameters for the conditional formatting.

This is a long one folks! If you have any questions, please let me know...

Pam


MAIN PARAMETERS:
Column HD (CTR Code):
- Should always contain an entry.
- Only evaluating for D, DA, A, and Q.
- Paramaters are different for A/Q vs. D/DA.

Column HB (Grand Total [$]):
- Should always contain a formula.
- Macro exists to create FUNCTION [HASFormula()]

Override (i.e., turn off) Conditional Formatting:
Either of the below should work:
- Cell $D$1="X"
- - OR - -
- Two spaces at the end of a line (i.e., a RIGHT($?#, 2)=" " formula) when entered in:
o Column D for rows with a CTR Code "A" or "Q"
o Column E for rows with a CTR Code "D" or "DA"

CTR CODE-SPECIFIC PARAMETERS:
Parameters For Deliverable Items (CTR Code "D" or "DA"):
- Column HD (CTR Code) - Should always contain an entry. Only evaluate rows that contain "D" or "DA"
- Column D (Document Number) *
- Column E (Document Name) * However, sometimes used for heading information all other cells (with the exception of column EK - Total Hours) should be blank. Column EK may or may not contain hours.
- Column F (Drawing Count) **
- Column G (Document Count) **
- Column H (Outside Review) *
- Column HB (Grand Total)

* When all the other columns noted here have an entry, this cell must not be blank.
'** When all the other columns noted here have an entry, column F or G must have an entry in only one of the columns.

Parameters For Approach Items (CTR Code "A" or "Q"):
- Column HD (CTR Code) - Should always contain an entry. Only evaluate rows that contain "A" or "Q"
- Column D:H (Approach Description)
- Column HB - Grand Total


FORMULAS:
I've given up trying to incorporate all the requirements in one conditional formatting and was attempting to develop several formulas. Below is a formula that I created (that works!) to evaluate columns HB and HD and to remove conditional formatting:

'=AND($D$1<>"X", OR(AND(NOT(HASformula($HB9)), OR($HD9="A", $HD9="D", $HD9="DA", $HD9="$", $HD9="Q")), AND(HASformula($HB9), $HD9="")))

The other formula (posted below) is for DELIVERABLES (CTR Code D or DA) that I was working on, but for which I have not had success. I've gone through several iterations over the past several days, and this is the latest formula and worksheet:

Excel Workbook
ABCDEKLMN
1DEFGHHBHD
2
3PROJECTGrand TotalCTR CodeFORMULASD, DADesired Result Col
4
51Group 1TSCIADQ$HORFALSEF
6ScopeSFALSEF
7CommentsCFALSEF
8Required InformationIFALSEF
9Approach:$628,000.00AFALSEF
10Management AFALSEF
11MEETINGS:  AFALSEF
12Weekly$259,100.00AFALSEF
13Other Administration$272,000.00AFALSEF
14Travel Expenses$160,000.00AFALSEF
15$12,500.00AFALSET
16 AFALSEF
17NumberTitleDwgs.(Shts.)Docs.Class*(Y/N)DXFALSEF
18DocumentsDHFALSEF
19HEADING TEST:  DAFALSEF
20AAADocument1,000N$12,500,000.00DATRUEF
21HEADING TEST: DATRUET
22Document1,000N$12,500,000.00DATRUET
23AAA1N$12,500.00DATRUET
24AAADocumentN$12,500.00DATRUET
25AAADocument11N$12,500.00DATRUET
26AAADocument100$1,250,000.00DATRUET
27AAADocument10N DATRUET
28$12,500.00DATRUET
29 DATRUEF
30DrawingsDHFALSEF
31BBBDrawing11N$12,500.00DTRUET
32BBBDrawingN$12,500.00DTRUET
MrExcel
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top