Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Comparing Dates - Generic Function?

I have to columns that are of type date. There is a third column that
I want to indicate, for each row, if the 1st column's date is more
recent (i.e. greater) than the second column's date. If that is true,
I want the text "Yes" to be entered in the third column for the row in
question. If it isn't true, I want there to be no text in the third
column for the row in question.

I've seen tons of date comparison posts here, but they are always using
actual cell identifiers (i.e. A20). I need a more generic function
that will work on the column. The requirement is when someone updates
any date in this spreadsheet that the third column cell will update
automatically. Is this possible in Excel?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Comparing Dates - Generic Function?


based on what you said, let's say you have 3 columns
A1,B1,C1

this should be a simple if statement that goes something like this:
(insert in C1)

IF(B1A1,"Yes","")

hope this helps..
salah

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Comparing Dates - Generic Function?

Thanks for the reply. Yes, this would work as a function for cell C1.
What I need is a function that I can apply to the entire C column so I
just have to write one function. In other words, I don't want to write
this function in column C for every row that I have data. Is this
possible? In pseudocode, I am hoping I can create a function like:

IF(CurrentRowCell -1 CurrentRowCell - 2, "Yes", "")

and somehow assign this to the column. If this is possible, I might
need more robust code to deal with rows that don't have any data in
column A and/or column C.

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
Comparing Dates John Excel Discussion (Misc queries) 4 October 5th 09 08:43 PM
Comparing 2 Dates JWeaver Excel Worksheet Functions 3 August 14th 08 09:01 PM
Comparing Dates fubdap Excel Discussion (Misc queries) 3 September 27th 07 03:53 PM
Comparing dates Mr. Dan[_2_] Excel Programming 3 February 8th 06 07:29 AM
Comparing dates in an IF function Paula Excel Worksheet Functions 3 January 12th 05 02:21 PM


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