Microsoft Office Forums


Reply
Thread Tools Display Modes

How do I do a complex conditional in a conditional formatting formula

 
 
Ray Stevens
Guest
Posts: n/a

 
      03-12-2006, 04:18 PM
I am attempting to compare multiple fields in a conditional formatting
formulat but am not sure how. For example, the following generates an error
when I attempt to save it:

=IF($F2="",,TEXT(TODAY() and $L2="PSR","yyyy-mm-dd")>$F2)




 
Reply With Quote
 
 
 
 
davesexcel
Guest
Posts: n/a

 
      03-12-2006, 04:26 PM

Ray Stevens Wrote:
> I am attempting to compare multiple fields in a conditional formatting
> formulat but am not sure how. For example, the following generates an
> error
> when I attempt to save it:
>
> =IF($F2="",,TEXT(TODAY() and $L2="PSR","yyyy-mm-dd")>$F2)

WHAT IS THIS FORMULA SUPPOSED TO DO??


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=521513

 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a

 
      03-12-2006, 04:34 PM
I don't understand what condition you are trying to set up. It looks
like you want $L2 to be equal to "PSR" and $F2 is not blank, but where
does TODAY( ) come into it?

Please re-post with an explanation of what you want to do.

Pete

 
Reply With Quote
 
Ray Stevens
Guest
Posts: n/a

 
      03-12-2006, 05:22 PM
In this case I am looking to turn a row red if a text "date field" for an
agreed upon date is less than the current date and the column call type is
"PSR". The data is populated from a SQL Server stored procedure call where
all dates, unfortunately, are varchar(10) formatted as yyyy-mm-dd.

Ultimately, the row color will be determined by a number of criteria:

1. CallType = "PSR"
2. Status = "Open" or "Reopened"
3. Agreed date less than todays date. (i.e., the PSR is late).

PSR's with no agreed date will be another color and PSR's approaching their
agreed date within a specified period (say, a few days) and still open will
be yet another.

"Pete_UK" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I don't understand what condition you are trying to set up. It looks
> like you want $L2 to be equal to "PSR" and $F2 is not blank, but where
> does TODAY( ) come into it?
>
> Please re-post with an explanation of what you want to do.
>
> Pete
>



 
Reply With Quote
 
Ray Stevens
Guest
Posts: n/a

 
      03-12-2006, 05:46 PM
Oops... to the criteria below, add:
4. Category NOT = "Parking Lot"

"Ray Stevens" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> In this case I am looking to turn a row red if a text "date field" for an
> agreed upon date is less than the current date and the column call type is
> "PSR". The data is populated from a SQL Server stored procedure call where
> all dates, unfortunately, are varchar(10) formatted as yyyy-mm-dd.
>
> Ultimately, the row color will be determined by a number of criteria:
>
> 1. CallType = "PSR"
> 2. Status = "Open" or "Reopened"
> 3. Agreed date less than todays date. (i.e., the PSR is late).
>
> PSR's with no agreed date will be another color and PSR's approaching
> their agreed date within a specified period (say, a few days) and still
> open will be yet another.
>
> "Pete_UK" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>>I don't understand what condition you are trying to set up. It looks
>> like you want $L2 to be equal to "PSR" and $F2 is not blank, but where
>> does TODAY( ) come into it?
>>
>> Please re-post with an explanation of what you want to do.
>>
>> Pete
>>

>
>



 
Reply With Quote
 
Ray Stevens
Guest
Posts: n/a

 
      03-12-2006, 06:14 PM
Actually, the pseudo-code for what I am attempting in the conditional
formatting is something like this:

If (STATUS = "Open" or "Reopened") AND (CATEGORY not = "Parking Lot") AND
(CALLTYPE = "PSR")
IF AGREED_DATE and NEEDED_BY_DATE = BLANK
ROW COLOR = BLUE
ELSE
IF AGREED_DATE = BLANK
TEST_DATE = NEEDED_BY_DATE
ELSE
TEST_DATE = AGREED_DATE
END_IF
IF TODAYS_DATE > TEST_DATE
ROW COLOR = RED
END_IF
END_IF
END_IF

NOTE: All date fields are populated from SQL Server as varchar(10)
yyyy-mm-dd.


"Pete_UK" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I don't understand what condition you are trying to set up. It looks
> like you want $L2 to be equal to "PSR" and $F2 is not blank, but where
> does TODAY( ) come into it?
>
> Please re-post with an explanation of what you want to do.
>
> Pete
>



 
Reply With Quote
 
Peo Sjoblom
Guest
Posts: n/a

 
      03-12-2006, 07:23 PM
=AND($F2<TODAY(),$L2="PSR")

if you want to use conditional formatting the whole idea if you want to use
formulas is to have the formulas return TRUE or FALSE, no need for IF
functions at all Having said that I believe you haven't really explained so
we can understand so I don't know if the above is of any help, but it is a
basic way of setting up a condition

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"Ray Stevens" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> In this case I am looking to turn a row red if a text "date field" for an
> agreed upon date is less than the current date and the column call type is
> "PSR". The data is populated from a SQL Server stored procedure call where
> all dates, unfortunately, are varchar(10) formatted as yyyy-mm-dd.
>
> Ultimately, the row color will be determined by a number of criteria:
>
> 1. CallType = "PSR"
> 2. Status = "Open" or "Reopened"
> 3. Agreed date less than todays date. (i.e., the PSR is late).
>
> PSR's with no agreed date will be another color and PSR's approaching
> their agreed date within a specified period (say, a few days) and still
> open will be yet another.
>
> "Pete_UK" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>>I don't understand what condition you are trying to set up. It looks
>> like you want $L2 to be equal to "PSR" and $F2 is not blank, but where
>> does TODAY( ) come into it?
>>
>> Please re-post with an explanation of what you want to do.
>>
>> Pete
>>

>
>


 
Reply With Quote
 
Ray Stevens
Guest
Posts: n/a

 
      03-12-2006, 09:24 PM
I realized I wasn't clear as to my ultimate goal and expanded upon it in my
response to Pete_UK. The following is what I posted to him:

Actually, the pseudo-code for what I am attempting in the conditional
formatting is something like this:

If (STATUS = "Open" or "Reopened") AND (CATEGORY not = "Parking Lot") AND
(CALLTYPE = "PSR")
IF AGREED_DATE and NEEDED_BY_DATE = BLANK
ROW COLOR = BLUE
ELSE
IF AGREED_DATE = BLANK
TEST_DATE = NEEDED_BY_DATE
ELSE
TEST_DATE = AGREED_DATE
END_IF
IF TODAYS_DATE > TEST_DATE
ROW COLOR = RED
END_IF
END_IF
END_IF

NOTE: All date fields are populated from SQL Server as varchar(10)
yyyy-mm-dd.


"Peo Sjoblom" <peo.sjoblom@^^nwexcelsolutions.com> wrote in message
news:(E-Mail Removed)...
> =AND($F2<TODAY(),$L2="PSR")
>
> if you want to use conditional formatting the whole idea if you want to
> use formulas is to have the formulas return TRUE or FALSE, no need for IF
> functions at all Having said that I believe you haven't really explained
> so we can understand so I don't know if the above is of any help, but it
> is a basic way of setting up a condition
>
> --
>
> Regards,
>
> Peo Sjoblom
>
> Northwest Excel Solutions
>
> www.nwexcelsolutions.com
>
> (remove ^^ from email address)
>
> Portland, Oregon
>
>
>
>
> "Ray Stevens" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> In this case I am looking to turn a row red if a text "date field" for an
>> agreed upon date is less than the current date and the column call type
>> is "PSR". The data is populated from a SQL Server stored procedure call
>> where all dates, unfortunately, are varchar(10) formatted as yyyy-mm-dd.
>>
>> Ultimately, the row color will be determined by a number of criteria:
>>
>> 1. CallType = "PSR"
>> 2. Status = "Open" or "Reopened"
>> 3. Agreed date less than todays date. (i.e., the PSR is late).
>>
>> PSR's with no agreed date will be another color and PSR's approaching
>> their agreed date within a specified period (say, a few days) and still
>> open will be yet another.
>>
>> "Pete_UK" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) oups.com...
>>>I don't understand what condition you are trying to set up. It looks
>>> like you want $L2 to be equal to "PSR" and $F2 is not blank, but where
>>> does TODAY( ) come into it?
>>>
>>> Please re-post with an explanation of what you want to do.
>>>
>>> Pete
>>>

>>
>>

>



 
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
Using query results within Conditional Statement...sequenced conditional queries rafael.farias.jr@gmail.com Access Newsgroup 3 08-30-2006 01:08 PM
Conditional Formatting Formula SparkleTX Infopath Newsgroup 3 12-03-2004 10:34 PM
Conditional Formatting in a formula Nick Excel Newsgroup 7 10-07-2004 10:34 AM
conditional formatting for formula resulting in text terrapinie Excel Newsgroup 2 06-11-2004 12:20 PM
Conditional, Conditional Formatting John Meyer Excel Newsgroup 8 12-21-2003 07:37 PM



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