View Single Post
  #13   Report Post  
Bob Phillips
 
Posts: n/a
Default

Is it because the dates are not real dates, but text?

Here is a nother variation to try

=IF(IF(A2=4,DATE(A2,1,1),DATEVALUE(A2))--"1979-12-01","UNDERAGE","ADULT")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"reneabesmer" wrote in message
...
Bob Phillips i have again the problem ur formula don't work in Excel when

i
import Access Table to Ms Excel and then when i apply ur formula on Ms

Access
Table in Ms Excel i don't know whyyy
could u help me plzzzzzzzzzzz
thankx


"Bob Phillips" wrote:

Okay I will try

I am using an IF to get a value that is used within an outer IF with

this
code IF(A2=4,DATE(A2,1,1),A2). What it says is that if A2 is only 4

digits,
i,e just a year assume a date that is 1st Jan of that year, else use the
whole date. The value returned is then just compared against our target

date
for under-ageness.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"reneabesmer" wrote in message
...
thanks Bob i do understand what is mean by -- but still i have the

problem
2
understand rest of the formula. and one thing 2 remind u that we OSI

Date.
let me explain my problem again with the formula
Column A Column B
1-jan-1980

=IF(IF(A2=4,DATE(A2,1,1),A2)--"1979-12-01","UNDERAGE","ADULT")
1979
15-apr-1958

it gives me the correct result so thanks alot for that
but dear friend would u like 2 explain =if(if(A2=4,date(A2,1,1),A2)
plz i need some detail of it.
i really Appreciate ur help





"reneabesmer" wrote:

so dear friends i am working in an NGOs here in Afghanistan
and here i have my data about populations and those whos age is less

then
31-dec-1979 are called underage and the rest of called Adult
so how can find the correct result , my date in age Column in Excel

sheet
is below

Column c
1-jan-1980
23-jul-1985
3-apr-2002
1980
3-nov-1996
1958

so i have such kind of data . so plz i really need ur help. that

must be
appreciated.
thanks alot
Looking forward for Solution