Possible formula question

J

Jay F. Schlueter

Not even sure if it is possible in Excel, but what I'd like to do is the
following:

A1 TO A25 is a list of part numbers (A8100,A8095,A8201, etc.), when I move
around the cells
in that range I would like C1's value to change to cell I'm currently in, so
if the value of A2 is "A8100"
I would like C1's value to also be "A8100", when I move to A3 and it's value
is "A8095" I want C1's
value to change to "A8095" and so on.

Is this possible?? Help with this will be very appreciated!

Jay
 
D

Debra Dalgleish

You could do this with code:

1. Right-click on the sheet tab, and choose View Code.
2. Paste in the following code
3. Choose File>Close and Return to MS Excel

When you open the workbook, you'll be prompted to allow macros.

'===============================
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Intersect(Target, Range("A1:A25")) Is Nothing Then
Else
Range("C1").Value = Target.Value
End If
End Sub
'===============================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top