Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
FBB
 
Posts: n/a
Default How to write a "Text" or date custom format

I'm trying to create a spreadsheet which would automate my weekly reports. My
book would contain 5 sheets (sheet1 being the report, and sheet2 to 5 would
be the weekly data). In some instances, I want to report that a dated event
(action item, expiration, schedule) is occuring on the date referenced on the
appropriate sheet. In other cases, if not data is present, or if the data
doesn't meet certain conditions, I want instead a Text String to be displayed
(i.e N/A, Pending, Past Due, etc...).

Is there a way to do this without using visual basic? Can it be done with
Custom Cell Formatting, and conditional statements?

I really appreciate the help??

Sincerely,

FBB
  #2   Report Post  
Steve Smallman
 
Posts: n/a
Default

Hi,

in this example, I have set up Due date in column A, date completed in
column B and the formula in column C

=IF(ISNUMBER(B2),"Complete",IF(A2="","NA",IF(A2<IN T(NOW()),"Past
Due",IF(A2=INT(NOW()),"Due","Pending"))))

A relatively complex nested if that you can apply by changing the cell
references.

Breaking it down:
IF(ISNUMBER(B2),"Complete",IF( - If there is a number in the date
completed column (i.e. a date) then the task is complete, display complete.
If not, then
IF(A2="","NA",IF - is there a due date, if not then show NA, if so
then
IF(A2<INT(NOW()),"Past Due",IF - Is the date listed in A2 before today
(Now returns todays date, INT(NOW()) converts it to a day not a day and
time), if in the past, show Past Due, if not
IF(A2=INT(NOW()),"Due","Pending")))) - does A2 refer to today? if so,
then show Due, if not Pending

take a look at the way Excel stores and treats dates, and then have a look
at the logic of an IF function.

All should become as clear as mud!

Steve


"FBB" wrote in message
...
I'm trying to create a spreadsheet which would automate my weekly reports.
My
book would contain 5 sheets (sheet1 being the report, and sheet2 to 5
would
be the weekly data). In some instances, I want to report that a dated
event
(action item, expiration, schedule) is occuring on the date referenced on
the
appropriate sheet. In other cases, if not data is present, or if the
data
doesn't meet certain conditions, I want instead a Text String to be
displayed
(i.e N/A, Pending, Past Due, etc...).

Is there a way to do this without using visual basic? Can it be done with
Custom Cell Formatting, and conditional statements?

I really appreciate the help??

Sincerely,

FBB



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
pasting data from a website changes text to date stebro Excel Discussion (Misc queries) 8 August 12th 06 08:39 PM
Custom Date format ie. 01.01.05 W1 (W1 is week 1) aspen Excel Discussion (Misc queries) 3 December 29th 04 04:23 AM
Date format collapses diagram Richard H Excel Discussion (Misc queries) 3 December 14th 04 11:08 PM
Problem with Date format from VBA code twig Excel Discussion (Misc queries) 3 December 7th 04 06:01 PM
Date on two lines using a custom cell format possible? .:mmac:. Excel Discussion (Misc queries) 5 December 4th 04 09:41 PM


All times are GMT +1. The time now is 07:03 PM.

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"