Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Comparing Dates | Excel Discussion (Misc queries) | |||
Comparing 2 Dates | Excel Worksheet Functions | |||
Comparing Dates | Excel Discussion (Misc queries) | |||
Comparing dates | Excel Programming | |||
Comparing dates in an IF function | Excel Worksheet Functions |