A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I add more ranges to the following formula?



 
 
Thread Tools Display Modes
  #1  
Old November 14th, 2009, 04:17 PM posted to microsoft.public.excel.misc
neivamj
external usenet poster
 
Posts: 2
Default How do I add more ranges to the following formula?

(for Excel 2003)
I've a Yearly calendar and a table with around 27 diferent date ranges for 2
teams (alternating). I want the days in the calendar to change color
according to who is working ex. Red for Team1 and Green to Team2.

In each day of the calendar I used the folowing formula in Condition 1 and
the same with inverse False,True result in Condition 2:
=IF(OR(AND(S6$AA$5,S6$AB$5),AND(S6$AA$7,S6$AB$ 7),AND(S6$AA$9,S6$AB$9),AND(S6$AA$11,S6$AB$11) ,AND(S6$AA$13,S6$AB$13),AND(S6$AA$15,S6$AB$15) ,AND(S6$AA$17,S6$AB$17),AND(S6$AA$19,S6$AB$19) ),TRUE,FALSE)

This works for up to 8 ranges. How do I do the same with some other formula
that can accept more ranges?
--
Mario
  #2  
Old November 14th, 2009, 05:34 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default How do I add more ranges to the following formula?

Try this...

=SUMPRODUCT(--(MOD(ROW(AA5:AA19)-ROW(AA5),2)=0),--(S6AA5:AA19),--(S6AB5:AB19))

--
Biff
Microsoft Excel MVP


"neivamj" wrote in message
...
(for Excel 2003)
I've a Yearly calendar and a table with around 27 diferent date ranges for
2
teams (alternating). I want the days in the calendar to change color
according to who is working ex. Red for Team1 and Green to Team2.

In each day of the calendar I used the folowing formula in Condition 1 and
the same with inverse False,True result in Condition 2:
=IF(OR(AND(S6$AA$5,S6$AB$5),AND(S6$AA$7,S6$AB$ 7),AND(S6$AA$9,S6$AB$9),AND(S6$AA$11,S6$AB$11) ,AND(S6$AA$13,S6$AB$13),AND(S6$AA$15,S6$AB$15) ,AND(S6$AA$17,S6$AB$17),AND(S6$AA$19,S6$AB$19) ),TRUE,FALSE)

This works for up to 8 ranges. How do I do the same with some other
formula
that can accept more ranges?
--
Mario



  #3  
Old November 15th, 2009, 08:37 AM posted to microsoft.public.excel.misc
neivamj
external usenet poster
 
Posts: 2
Default How do I add more ranges to the following formula?

Thanks, it workwed perfectly.

--
Mario


"T. Valko" wrote:

Try this...

=SUMPRODUCT(--(MOD(ROW(AA5:AA19)-ROW(AA5),2)=0),--(S6AA5:AA19),--(S6AB5:AB19))

--
Biff
Microsoft Excel MVP


"neivamj" wrote in message
...
(for Excel 2003)
I've a Yearly calendar and a table with around 27 diferent date ranges for
2
teams (alternating). I want the days in the calendar to change color
according to who is working ex. Red for Team1 and Green to Team2.

In each day of the calendar I used the folowing formula in Condition 1 and
the same with inverse False,True result in Condition 2:
=IF(OR(AND(S6$AA$5,S6$AB$5),AND(S6$AA$7,S6$AB$ 7),AND(S6$AA$9,S6$AB$9),AND(S6$AA$11,S6$AB$11) ,AND(S6$AA$13,S6$AB$13),AND(S6$AA$15,S6$AB$15) ,AND(S6$AA$17,S6$AB$17),AND(S6$AA$19,S6$AB$19) ),TRUE,FALSE)

This works for up to 8 ranges. How do I do the same with some other
formula
that can accept more ranges?
--
Mario



.

  #4  
Old November 15th, 2009, 04:30 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default How do I add more ranges to the following formula?

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"neivamj" wrote in message
...
Thanks, it workwed perfectly.

--
Mario


"T. Valko" wrote:

Try this...

=SUMPRODUCT(--(MOD(ROW(AA5:AA19)-ROW(AA5),2)=0),--(S6AA5:AA19),--(S6AB5:AB19))

--
Biff
Microsoft Excel MVP


"neivamj" wrote in message
...
(for Excel 2003)
I've a Yearly calendar and a table with around 27 diferent date ranges
for
2
teams (alternating). I want the days in the calendar to change color
according to who is working ex. Red for Team1 and Green to Team2.

In each day of the calendar I used the folowing formula in Condition 1
and
the same with inverse False,True result in Condition 2:
=IF(OR(AND(S6$AA$5,S6$AB$5),AND(S6$AA$7,S6$AB$ 7),AND(S6$AA$9,S6$AB$9),AND(S6$AA$11,S6$AB$11) ,AND(S6$AA$13,S6$AB$13),AND(S6$AA$15,S6$AB$15) ,AND(S6$AA$17,S6$AB$17),AND(S6$AA$19,S6$AB$19) ),TRUE,FALSE)

This works for up to 8 ranges. How do I do the same with some other
formula
that can accept more ranges?
--
Mario



.



 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.