#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Help Required....

Dear All,
I want macro or formula for the below mentioned querry pls help i am
entering data's in cell A, B and output to be displayed in cell C as follows

A B C
01/11/06 02/11/06 1
NA NA NA
NO NO Voilated
01/11/06 NO Should show no for days from A cell
to today
01/11/06 NA 1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Help Required....

Try this UDF:


Function kiran(a, b)

kiran = ""

If IsDate(a) And IsDate(b) Then
kiran = b - a
Exit Function
End If

If a = "NA" And b = "NA" Then
kiran = "NA"
Exit Function
End If

If a = "NO" And b = "NO" Then
kiran = "voilated"
Exit Function
End If

If IsDate(a) And b = "NO" Then
kiran = Int(Now() - a)
Exit Function
End If

If IsDate(a) And b = "NA" Then
kiran = 1
End If

End Function


--
Gary's Student


"kiran" wrote:

Dear All,
I want macro or formula for the below mentioned querry pls help i am
entering data's in cell A, B and output to be displayed in cell C as follows

A B C
01/11/06 02/11/06 1
NA NA NA
NO NO Voilated
01/11/06 NO Should show no for days from A cell
to today
01/11/06 NA 1

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default Help Required....

That's great thanks ...:=(


"Gary''s Student" wrote:

Try this UDF:


Function kiran(a, b)

kiran = ""

If IsDate(a) And IsDate(b) Then
kiran = b - a
Exit Function
End If

If a = "NA" And b = "NA" Then
kiran = "NA"
Exit Function
End If

If a = "NO" And b = "NO" Then
kiran = "voilated"
Exit Function
End If

If IsDate(a) And b = "NO" Then
kiran = Int(Now() - a)
Exit Function
End If

If IsDate(a) And b = "NA" Then
kiran = 1
End If

End Function


--
Gary's Student


"kiran" wrote:

Dear All,
I want macro or formula for the below mentioned querry pls help i am
entering data's in cell A, B and output to be displayed in cell C as follows

A B C
01/11/06 02/11/06 1
NA NA NA
NO NO Voilated
01/11/06 NO Should show no for days from A cell
to today
01/11/06 NA 1

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
Required fields in Excel [email protected] New Users to Excel 5 November 4th 10 05:33 PM
Make text cells and combo boxes required? mlroy@savvis Excel Discussion (Misc queries) 2 July 24th 06 08:19 PM
can you make a cell value required? nishapurohit Excel Discussion (Misc queries) 2 January 30th 06 11:42 PM
highlighting required fields maryann Excel Worksheet Functions 2 June 23rd 05 06:16 PM
Rate of return required formula Alorasdad Excel Worksheet Functions 1 November 18th 04 03:14 AM


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