#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel If command

hi,
I am finding difficulty in putting the right code in the bar, it was that;
if there is a date ( 30April2008) and the formula is applied in the very
next box of it. that if there are less than 30 days left in the date
specified box then it become red or the wording will become red.

i am not aware of what to do with the color but i was just trying to write
the basic formula first but wasn't successful
=if(a1<=date(0,0,30), red, " ")
but it didn't work out for me
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Excel If command

You can do this with conditional formatting. Select the cell(s) in
column A (with A1 being the active cell of the selection), then click
on Format | Conditional Formatting. In the first panel of the pop-up
you should select Formula Is rather than Cell Value Is, and then put
this formula in the next panel:

=A1-TODAY()<=30

Click on the Format button, select the Patterns tab (for background
colour) and click on Red. Click OK twice to exit the dialogue boxes.

Any dates which are within 30 days of today's date will be
highlighted.

Hope this helps.

Pete

On Jan 23, 4:11*pm, Fahad Javaid <Fahad
wrote:
hi,
I am finding difficulty in putting the right code in the bar, it was that;
if there is a date ( 30April2008) and the formula is applied in the very
next box of it. that if there are less than 30 days left in the date
specified box then it become red or the wording will become red.

i am not aware of what to do with the color but i was just trying to write
the basic formula first but wasn't successful
=if(a1<=date(0,0,30), red, " ")
but it didn't work out for me


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel If command

i added the stated formula but i was just wondering that,
A1 = 26/01/2009 and assuming today's date is 15/2/2009
=a1-today()<=30
the answer should be negative and even then it satisfies the condition.

"Pete_UK" wrote:

You can do this with conditional formatting. Select the cell(s) in
column A (with A1 being the active cell of the selection), then click
on Format | Conditional Formatting. In the first panel of the pop-up
you should select Formula Is rather than Cell Value Is, and then put
this formula in the next panel:

=A1-TODAY()<=30

Click on the Format button, select the Patterns tab (for background
colour) and click on Red. Click OK twice to exit the dialogue boxes.

Any dates which are within 30 days of today's date will be
highlighted.

Hope this helps.

Pete

On Jan 23, 4:11 pm, Fahad Javaid <Fahad
wrote:
hi,
I am finding difficulty in putting the right code in the bar, it was that;
if there is a date ( 30April2008) and the formula is applied in the very
next box of it. that if there are less than 30 days left in the date
specified box then it become red or the wording will become red.

i am not aware of what to do with the color but i was just trying to write
the basic formula first but wasn't successful
=if(a1<=date(0,0,30), red, " ")
but it didn't work out for me



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Excel If command

I'm not sure what your question is. Can you please state clearly what
you want to achieve?

Pete

On Jan 26, 10:29*am, Fahad Javaid
wrote:
i added the stated formula but i was just wondering that,
A1 = 26/01/2009 and assuming today's date is 15/2/2009
=a1-today()<=30
the answer should be negative and even then it satisfies the condition.



"Pete_UK" wrote:
You can do this with conditional formatting. Select the cell(s) in
column A (with A1 being the active cell of the selection), then click
on Format | Conditional Formatting. In the first panel of the pop-up
you should select Formula Is rather than Cell Value Is, and then put
this formula in the next panel:


=A1-TODAY()<=30


Click on the Format button, select the Patterns tab (for background
colour) and click on Red. Click OK twice to exit the dialogue boxes.


Any dates which are within 30 days of today's date will be
highlighted.


Hope this helps.


Pete


On Jan 23, 4:11 pm, Fahad Javaid <Fahad
wrote:
hi,
I am finding difficulty in putting the right code in the bar, it was that;
if there is a date ( 30April2008) and the formula is applied in the very
next box of it. that if there are less than 30 days left in the date
specified box then it become red or the wording will become red.


i am not aware of what to do with the color but i was just trying to write
the basic formula first but wasn't successful
=if(a1<=date(0,0,30), red, " ")
but it didn't work out for me- Hide quoted text -


- Show quoted text -


Reply
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
Pivot Table Error Message - "Command Text not set for command obje Jeff Divian Excel Discussion (Misc queries) 0 November 7th 07 10:26 PM
Looking for command help in Excel Outatime Excel Worksheet Functions 0 July 30th 06 11:05 PM
IF command in Excel Lee Davison Excel Discussion (Misc queries) 1 April 4th 05 10:23 PM
USING A GOTO COMMAND IN EXCEL gscar2005 Excel Worksheet Functions 1 February 9th 05 05:30 AM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 06:06 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"