Re: Excel function for tables
From: Jonathan Rynd (pqaf4hm02_at_atsneakemail.com.invalid)
Date: Sat, 14 Feb 2004 03:13:19 GMT
=?Utf-8?B?cmJyb3dubGVl?= <email@example.com> wrote in
> Yes, that is correct.
> Just so that I can practice explaining myself.....
> We want to activate the cell (or highlight the entire row if that is
> easier) on the travel form . We will then switch over to the mileage
> chart. On the mileage chart we will click on the cell containing the
> numeric value of the mileage.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim c As Integer
Dim r As Long
If Target.Count > 1 Then Exit Sub
c = Target.Column
r = Target.Row
If c < 2 Or c > 13 Or r < 3 Or r > 14 Then Exit Sub
with activeworkbook.Sheets("Travel Form")
.Cells(ActiveSheet.Row,6) = Target.Value
.Cells(ActiveSheet.Row,3) = Cells(2, c).Value
.Cells(ActiveSheet.Row,2) = Cells(r, 1).Value
-- My email address has an extra @ (spell it out) and an extra invalid. Please remove them if you are not a spammer or list broker and want to reply.