Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default need formula to set value based on a date

in column O i have a date in format dd/mm/yy. In column P I want to pu
a formula to say:

if O is blank then do nothing

if date in O is not in the past then cell value= number of days fro
today

if date in O IS in the past then cell value = "Expired"

I already have conditional formatting set up to colour the cells i
based on the date, so now I just need to fill them in.

I know its not hugely difficult, I just cant ever get the formulas t
work properly hehe

Thank

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default need formula to set value based on a date

Hi
try the following in P1
=IF(O1="","",IF(O1=TODAY(),O1-TODAY(),"Expired"))

-----Original Message-----
in column O i have a date in format dd/mm/yy. In column

P I want to put
a formula to say:

if O is blank then do nothing

if date in O is not in the past then cell value= number

of days from
today

if date in O IS in the past then cell value = "Expired"

I already have conditional formatting set up to colour

the cells in
based on the date, so now I just need to fill them in.

I know its not hugely difficult, I just cant ever get the

formulas to
work properly hehe

Thanks


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default need formula to set value based on a date

seems to be almost right, but its putting a date into P1 instead of th
number of days between today and the date that is in O.

Thank

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default need formula to set value based on a date

Hi
just format this cell as 'General' ('Format - Cells')

-----Original Message-----
seems to be almost right, but its putting a date into P1

instead of the
number of days between today and the date that is in O.

Thanks


---
Message posted from http://www.ExcelForum.com/

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default need formula to set value based on a date

ahh yes thats got it, didnt realise i had the column formatted as
date.

Thank

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default need formula to set value based on a date

in column O i have a date in format dd/mm/yy. In column P I want to put
a formula to say:

if O is blank then do nothing

if date in O is not in the past then cell value= number of days from
today

if date in O IS in the past then cell value = "Expired"

I already have conditional formatting set up to colour the cells in
based on the date, so now I just need to fill them in.

I know its not hugely difficult, I just cant ever get the formulas to
work properly hehe


here still another possibility:
Formula in P1:
= If(O1="", "",O1-TODAY())

Use the user-defined numberformat:
0;[<0]"Expired";

--
Mit freundlichen Grüssen

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

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
Formula based on the lastest date for date Andy B[_2_] Excel Discussion (Misc queries) 5 September 1st 08 05:52 PM
Formula based on Date Jennifer Excel Worksheet Functions 2 June 25th 08 04:20 PM
Earlest Date Based On A Date Using Min Formula Cue Excel Discussion (Misc queries) 5 May 5th 08 05:49 PM
Need to create formula based on date Gary''s Student New Users to Excel 0 November 29th 06 11:32 PM
Convert formula to value based upon date mp Excel Discussion (Misc queries) 3 November 18th 05 05:58 PM


All times are GMT +1. The time now is 01:56 AM.

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

About Us

"It's about Microsoft Excel"