Microsoft Office Forums


Reply
Thread Tools Display Modes

Conditional Formatting

 
 
Vinod Chandramouli
Guest
Posts: n/a

 
      12-07-2008, 10:54 AM
Alright folks I have been breaking my head with this problem and here
you go. I have a sheet which has about 250000 records. There is one
column which will be the base of this question.

Home Country
Albania
<blank>
<blank>
Australia
<blank>
<blank>
<blank>
<blank>
<blank>
<blank>
Austria
<blank>
<blank>
<blank>
<blank>
<blank>

My Question is I have to format my entire sheet using this column,
where I need alternate colors for each country and the blank cells
below it.I.E., From Albania till Australia it should be in one color
and from Australia to Austria it should be in another color. I have
tried Conditional Formatting formulas and tried playing around with my
limited knowledge over VBA Scripts.

I am using Excel 2007 and MS Vista if that helps....Any takers out
there for this problem ?

Vinod Chandramouli
 
Reply With Quote
 
 
 
 
Ron Rosenfeld
Guest
Posts: n/a

 
      12-07-2008, 11:59 AM
On Sun, 7 Dec 2008 03:54:06 -0800 (PST), Vinod Chandramouli
<(E-Mail Removed)> wrote:

>Alright folks I have been breaking my head with this problem and here
>you go. I have a sheet which has about 250000 records. There is one
>column which will be the base of this question.
>
>Home Country
>Albania
><blank>
><blank>
>Australia
><blank>
><blank>
><blank>
><blank>
><blank>
><blank>
>Austria
><blank>
><blank>
><blank>
><blank>
><blank>
>
> My Question is I have to format my entire sheet using this column,
>where I need alternate colors for each country and the blank cells
>below it.I.E., From Albania till Australia it should be in one color
>and from Australia to Austria it should be in another color. I have
>tried Conditional Formatting formulas and tried playing around with my
>limited knowledge over VBA Scripts.
>
>I am using Excel 2007 and MS Vista if that helps....Any takers out
>there for this problem ?
>
>Vinod Chandramouli


1. Select the column to be formatted
This should result in the cell in Row 1 being the active cell.
2. Conditional Formatting
New Rule
Use a formula to determine ...

(assuming Column A)
3 Format values where this formula is true:
=MOD(COUNTA($A$1:A1),2)=1
(Format to taste)
<OK>

4 New Rule
Format values where this formula is true:
=MOD(COUNTA($A$1:A1),2)=0
(Format to taste)
<OK>

--ron
 
Reply With Quote
 
Vinod Chandramouli
Guest
Posts: n/a

 
      12-07-2008, 12:31 PM
Ron,
Thanks for your response. I think we might be on the wrong page.
Your requirement colors alternate tab which is the concept but here is
what i want.

Home Country
Albania - Blue
<blank> - Blue
<blank> - Blue
Australia - Green
<blank> - Green
<blank> - Green
<blank> - Green
<blank> - Green
<blank> - Green
<blank> - Green
Austria - Blue
<blank> - Blue
<blank> - Blue

I hope this helps.

-- vinod chandramouli

 
Reply With Quote
 
muddan madhu
Guest
Posts: n/a

 
      12-07-2008, 01:33 PM
may be this ?
select the first cell which has value

Sub color_it()
Do Until ActiveCell.Value = ""
Range(Selection, Selection.End(xlDown)).Select
Selection.Interior.ColorIndex = 5
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Interior.ColorIndex = 4
Selection.End(xlDown).Select
Loop
End Sub


On Dec 7, 6:31*pm, Vinod Chandramouli <chandramouli.vi...@gmail.com>
wrote:
> Ron,
> * Thanks for your response. I think we might be on the wrong page.
> Your requirement colors alternate tab which is the concept but here is
> what i want.
>
> Home Country
> Albania * * * * * * *- Blue
> <blank> * * * * * * - Blue
> <blank> * * * * * * - Blue
> Australia * * * * * *- Green
> <blank> * * * * * *- Green
> <blank> * * * * * *- Green
> <blank> * * * * * *- Green
> <blank> * * * * * *- Green
> <blank> * * * * * *- Green
> <blank> * * * * * *- Green
> Austria * * * * * * *- Blue
> <blank> * * * * * *- Blue
> <blank> * * * * * *- Blue
>
> I hope this helps.
>
> -- vinod chandramouli


 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a

 
      12-07-2008, 02:39 PM
On Sun, 7 Dec 2008 05:31:52 -0800 (PST), Vinod Chandramouli
<(E-Mail Removed)> wrote:

>Ron,
> Thanks for your response. I think we might be on the wrong page.
>Your requirement colors alternate tab which is the concept but here is
>what i want.
>
>Home Country
>Albania - Blue
><blank> - Blue
><blank> - Blue
>Australia - Green
><blank> - Green
><blank> - Green
><blank> - Green
><blank> - Green
><blank> - Green
><blank> - Green
>Austria - Blue
><blank> - Blue
><blank> - Blue
>
>I hope this helps.
>
>-- vinod chandramouli


I hope that when you wrote "tabs" you meant "rows" as the routine I gave you
will have no effect on any tabs.

However, if it is coloring alternate rows, then either your blank cells are not
blank, or you are not following my instructions properly.

Let's see if we can figure this out.

Please select the first cell in your column.
Then select Conditional Formatting
Manage rules

You should see two rules

Copy the contents of the
Applies to:
box and paste it in your reply.

Then select that rule again;
select Edit Rule
copy the Rule Description from the box and paste it into your reply.


--ron
 
Reply With Quote
 
Vinod Chandramouli
Guest
Posts: n/a

 
      12-07-2008, 03:12 PM
Ron,
Here you go...

Applies To
1) =$B:$B
2) =$B:$B

Rule Description
1) =MOD(SUBTOTAL(3,$B$10:$B11),2)
2) =MOD(SUBTOTAL(3,$B$10:$B11),2)

And I stand corrected I meant rows not columns.
 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a

 
      12-07-2008, 03:53 PM
On Sun, 7 Dec 2008 08:12:25 -0800 (PST), Vinod Chandramouli
<(E-Mail Removed)> wrote:

>Ron,
> Here you go...
>
>Applies To
>1) =$B:$B
>2) =$B:$B
>
>Rule Description
>1) =MOD(SUBTOTAL(3,$B$10:$B11),2)
>2) =MOD(SUBTOTAL(3,$B$10:$B11),2)
>
>And I stand corrected I meant rows not columns.



There are a number of differences between the formula I recommended and that
which you are using.

=MOD(COUNTA($A$1:A1),2)=1
=MOD(COUNTA($A$1:A1),2)=0

1. It's probably OK to substitute the SUBTOTAL(3,...) if you don't want to
include rows that are suppressed by the Filter.

2. It is NOT ok to omit the equality (at least the =0 should be there) as 1
and 0 may not necessarily being evaluated as TRUE or FALSE.
enter =1=TRUE on your worksheet and you will see this evaluates to
FALSE; as does =0=FALSE.

3. Your modified formulas,should read:

=MOD(SUBTOTAL(3,$B$1:$B1),2)=1
=MOD(SUBTOTAL(3,$B$1:$B1),2)=0

--ron
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting Sandy Excel Newsgroup 4 02-05-2008 03:38 PM
auto formatting/Conditional formatting. xlsstudent Project Newsgroup 3 11-09-2007 09:06 PM
Conditional Formatting Dale Excel Newsgroup 0 03-15-2007 04:35 PM
How do I do a complex conditional in a conditional formatting formula Ray Stevens Excel Newsgroup 7 03-12-2006 09:24 PM
Conditional, Conditional Formatting John Meyer Excel Newsgroup 8 12-21-2003 07:37 PM



All times are GMT. The time now is 01:58 PM.