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

Hi All,
Can any one help me on this I have 2 sheets in a work book, In sheet1 I will
be entering the numbers in a column as follows: -
A
68504
69272
68493
68325
68323

now my query is I will be entering the data in sheet2 as follows
A
59944
67331
68323
70778
68504

If the number entered in column A of sheet1 is avilable in column A of
sheet2 I want out put as follows in sheet2

A B C
59944 Na -
67331 Na -
68323 Yes current date
70778 Na
68504 Yes current date

Note the numbers entered in column A of sheet1 may not be in sorted order it
will be in random wise.

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Help....

Use the VLOOKUP function.

"kiran" wrote:

Hi All,
Can any one help me on this I have 2 sheets in a work book, In sheet1 I will
be entering the numbers in a column as follows: -
A
68504
69272
68493
68325
68323

now my query is I will be entering the data in sheet2 as follows
A
59944
67331
68323
70778
68504

If the number entered in column A of sheet1 is avilable in column A of
sheet2 I want out put as follows in sheet2

A B C
59944 Na -
67331 Na -
68323 Yes current date
70778 Na
68504 Yes current date

Note the numbers entered in column A of sheet1 may not be in sorted order it
will be in random wise.

TIA

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Help....

Hi, try this.
In cell B1 of sheet 2, insert the following, then fill down:
=IF(COUNTIF(Sheet1!$A$1:$A$5,A1)0,"Yes","na")
In cell C1 of sheet 2, insert the following, then fill down:
=IF(B1="Yes",TODAY(),"")

If you want the date to be fixed, and not always show the current date, you
would need to use an event macro, or a macro one you run manually.
Regards - Dave.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Help....

Thanks Dav,
Can i have a macro to fix the date

TIA

"Dave" wrote:

Hi, try this.
In cell B1 of sheet 2, insert the following, then fill down:
=IF(COUNTIF(Sheet1!$A$1:$A$5,A1)0,"Yes","na")
In cell C1 of sheet 2, insert the following, then fill down:
=IF(B1="Yes",TODAY(),"")

If you want the date to be fixed, and not always show the current date, you
would need to use an event macro, or a macro one you run manually.
Regards - Dave.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Help....

Hi,
Try this.
Right-click the sheet tab, then copy and paste the following into the sheet
window:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Variant
On Error Resume Next
Application.EnableEvents = False
If Intersect(Target, Range("C1:C1000")) Is Nothing Then Exit Sub
A = Target.Value
If Target = Date Then Target.Value = A
Application.EnableEvents = True
End Sub

Change the range "C1:C1000" to suit your data.

"kiran" wrote:

Thanks Dav,
Can i have a macro to fix the date




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Help....

Hi Dave,
thanks for your swift responce i copyed & pated the code while executing no
change want to do ne change

"Dave" wrote:

Hi,
Try this.
Right-click the sheet tab, then copy and paste the following into the sheet
window:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Variant
On Error Resume Next
Application.EnableEvents = False
If Intersect(Target, Range("C1:C1000")) Is Nothing Then Exit Sub
A = Target.Value
If Target = Date Then Target.Value = A
Application.EnableEvents = True
End Sub

Change the range "C1:C1000" to suit your data.

"kiran" wrote:

Thanks Dav,
Can i have a macro to fix the date


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,388
Default Help....

Hi Kiran,
Sorry, but I can't understand your response.
Dave.

"kiran" wrote:

Hi Dave,
thanks for your swift responce i copyed & pated the code while executing no
change want to do ne change

"Dave" wrote:

Hi,
Try this.
Right-click the sheet tab, then copy and paste the following into the sheet
window:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Variant
On Error Resume Next
Application.EnableEvents = False
If Intersect(Target, Range("C1:C1000")) Is Nothing Then Exit Sub
A = Target.Value
If Target = Date Then Target.Value = A
Application.EnableEvents = True
End Sub

Change the range "C1:C1000" to suit your data.

"kiran" wrote:

Thanks Dav,
Can i have a macro to fix the date


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



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