Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gilles Desjardins
 
Posts: n/a
Default Genarate a fixed date with an IF function?

Hi everyone,

in A1 I would like to generate a fixed date based on what is happening in
B1, C1 and D1

B1= today() C1= B1-A1 D1 is most of the time "empty"

When D1 is empty, A1 should be empty but when an X is inserted in D1 a fixed
date should be generated in A1, therefore the result of A1 is used in C1.

Hope this is clear.

TIA

Gilles


  #2   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs
 
Posts: n/a
Default Genarate a fixed date with an IF function?


If you have your fixed date in a cell, e.g. Z1 use this formula in A1

=IF(D1="x",Z1,"")

otherwise you can reference the date directly in the formula, e.g.

=IF(D1="x",DATE(2005,12,31),"")

format cell as a date

in C1 formula should be

=IF(A1<"",B1-A1,"")

format as general


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=508778

  #3   Report Post  
Posted to microsoft.public.excel.misc
Gilles Desjardins
 
Posts: n/a
Default Genarate a fixed date with an IF function?

Thank you it works like a charm.

Gilles
"daddylonglegs"
wrote in message
news:daddylonglegs.22rwny_1139171400.8195@excelfor um-nospam.com...

If you have your fixed date in a cell, e.g. Z1 use this formula in A1

=IF(D1="x",Z1,"")

otherwise you can reference the date directly in the formula, e.g.

=IF(D1="x",DATE(2005,12,31),"")

format cell as a date

in C1 formula should be

=IF(A1<"",B1-A1,"")

format as general


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile:
http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=508778



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
Date function in Excel that updates only when a doc is changed? torino0020 Excel Worksheet Functions 1 January 5th 06 03:00 AM
Date Function Khangura Excel Discussion (Misc queries) 1 December 21st 05 09:33 AM
date format and the RIGHT function Rich Hayes Excel Worksheet Functions 2 December 19th 05 12:29 PM
date format and the RIGHT function Rich Hayes Excel Worksheet Functions 0 December 19th 05 11:06 AM
Date function geza Excel Worksheet Functions 2 February 11th 05 04:15 PM


All times are GMT +1. The time now is 02:19 PM.

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"