LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Help needed: Conditional Formatting for 3 columns, any two of whichmust have data

I have 3 columns, A, B, and C. Each will accept input of exactly 6 alphanumeric characters. Two of the three must be populated.

The Conditional Formatting is used to highlight columns which are not compliant.

I've got one for the 6 characters required (spaces before and after the strings are ignored):

=OR(LEN(TRIM(A1))6,AND(LEN(TRIM(B1))0,LEN(TRIM(C 1))<6))

And I've got formulas for error states when none or all of the columns are populated:

=AND(LEN(TRIM(A1))=0,LEN(TRIM(B1))=0,LEN(TRIM(C1)) =0)

=AND(LEN(TRIM(A1))0,LEN(TRIM(B1))0,LEN(TRIM(C1)) 0)

But my formula for ensuring that 2 of the columns are populated gets fooled by spaces in the columns, which should be ignored:

=COUNTBLANK(A1:C1)<2

My only alternative that i can think of is to do a fairly complicated AND OR formula with all of the acceptable combinations of the 3 columns.

I'm guessing there's a much more elegant, simple option?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting Help Needed Raz Excel Discussion (Misc queries) 3 March 3rd 09 05:25 PM
Conditional formatting help needed TGV Excel Discussion (Misc queries) 10 February 10th 09 05:58 PM
conditional formatting help needed learning quickly Excel Discussion (Misc queries) 2 September 10th 07 09:35 PM
Conditional Formatting in one column using data in two columns Renee Excel Worksheet Functions 4 February 22nd 06 06:58 PM
Conditional Formatting Help Needed... John Excel Programming 0 July 6th 04 10:36 PM


All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"