I may not understand all of your criteria, but I can get you started.
Excel has "events".
the one you want is the Worksheet_SelectionChange event.
Right-click on the sheet1 tab and select "view code".
in the VBA editor, in the top left box above the text area, use
the pull-down to select worksheet... the Selectionchange event 
is the default (I think).

It sounds like you only want this to happen if you select 
a cell in column "W"...
so, in the macro, check for column = 23 ("W")
If so, then set the sheet2 A1 cell to the value of the current row, column 1.

Like this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If (Target.Column = 23) Then
        Sheets("Sheet2").Cells(1, 1) = Cells(Target.Row, 1)
    End If
End Sub

hope this helps,

Paul



________________________________
From: H Upadhyay <harishcupadh...@gmail.com>
To: excel-macros@googlegroups.com
Sent: Tuesday, April 21, 2009 11:31:35 AM
Subject: $$Excel-Macros$$ Select range -- VVIMP


Dear All,

Need ur help

i have data in Sheet 1

    A  B  C  D   E  F  G  H  I J  K  L  M  N O  P  Q  R  S  T  U  V  W  X  Y  Z

1
2
3
4
5
6
7
8
9
.
.
.
.
.
.
.
.
.
10000


is it possible if i click sheet 1 W1 then i will get D1's value  in Sheet 2's  
A1 range
 if i click sheet 1 W2 then i will get D2's value  in Sheet 2's  A1 range
Similarly if i click sheet1 W100 then Sheet2's A1 value = Sheet1 D100
 
Dear All, its very urgent for me 
 
requested to u pls revert ASAP
 
Regards
Harish Upadhyay
9773284902

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to