ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   formula for date in cell (https://www.excelbanter.com/excel-discussion-misc-queries/219530-formula-date-cell.html)

Wiktor

formula for date in cell
 
I have got sells with future date for example 01-09-2009. I would like to get
this date marked before one mouth to this date. For example in day 01-08-2009
cell with date 01-10-2009 will be marked (by fat fontd or colour of cell
backgroud). I dont know is posiblle to write this formula.

OssieMac

formula for date in cell
 
Not sure that I understand your question. However, the following might point
you in the right direction.

If you have a column of dates then the following can be used to set the
color of the background of the cell containing a date that is one month after
today.

Select the cells containing the dates.
Select Conditional Format (See Help for how to do this)
In the Conditional Format dialog box, Select Formula.
Insert the following formula but replace A1 with the first cell in your
selection.
=A1=EDATE(TODAY(),1)
Select Format in the conditional formatting dialog box and set the
background (Under Fill or Patterns tab depending on version of xl) to your
desired color.

Click OK (or Apply depending you version of xl) until you exit the
Conditional formatting.

--
Regards,

OssieMac


"Wiktor" wrote:

I have got sells with future date for example 01-09-2009. I would like to get
this date marked before one mouth to this date. For example in day 01-08-2009
cell with date 01-10-2009 will be marked (by fat fontd or colour of cell
backgroud). I dont know is posiblle to write this formula.


Chris Bode

Please follow following steps
Let us suppose that you have the dates in column A with corresponding date formatting
1.Select column A
2.Click FormatConditional formatting from the toolbar
3.In the dialog box,select cell value is from the drop down box to the left
4.From the middle drop down list, select equal to
5.In the box to the right paste following
=DATE(YEAR(TODAY()),MONTH(TODAY())+1,DAY(TODAY()))
6.Click format button, select the desired color and click ok

Note that this will highlight the cell if the date it contains is 1 month more than current date

Hope this works for you


Chris
------
Convert your Excel spreadsheet into an online calculator.
http://www.spreadsheetconverter.com

smartin

formula for date in cell
 
Wiktor wrote:
I have got sells with future date for example 01-09-2009. I would like to get
this date marked before one mouth to this date. For example in day 01-08-2009
cell with date 01-10-2009 will be marked (by fat fontd or colour of cell
backgroud). I dont know is posiblle to write this formula.


If the cell to check is B2, a formula like

=B2-TODAY()

will tell you the number of days between today and the date to check.

A positive number means the date is in the future. A positive number
less than 30 means it's approximately within a month.

You could use such formulae in conditional formatting to highlight dates
automatically.


All times are GMT +1. The time now is 09:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com