LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Macro to select a cell in a table from a reference in a different

Hi

Try if this will help you (It's an event code, so it has to go into the
codesheet for the desired sheet):

Private Sub Worksheet_Change(ByVal Target As Range)
Set isect = Intersect(Target, Range("F1", "F2"))
If Not isect Is Nothing Then
If Range("F1") < "" And Range("F2") < "" Then
TargetCol = Range("F1").Value + 1 ' Names in Column A
TargetRow = Range("F2").Value + 1 ' Headers in Row 1
Cells(TargetRow, TargetCol).Select
End If
End If
End Sub

Regards,
Per

"Robert_NSBG" skrev i meddelelsen
...
Im trying to create a scoring sheet to score my daughters basketball
games.
I'm stuck, the score sheet is basically a table with 4 columns (periods 1
thru 4) and 12 rows (the 12 girls on the team).

In a cell (input cell 1) outside of the table, I manually enter 1,2,3 or 4
depending on the period we are playing.

I need the macro to select the column in the table(1 thru 4) based on the
period number I entered in input cell 1, next I need the macro to go down
a
given number of rows (also specified in another cell; input cell 2)

Please Help !!!!


 
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
How do I replace/select new fields in pivot table using a macro? snowdog Excel Discussion (Misc queries) 1 August 4th 09 03:58 AM
Select rows in pivot table with macro Dolphinv4 Excel Discussion (Misc queries) 1 April 22nd 08 06:21 PM
Macro - Pivot Table - Select Items S Sainsbury Excel Programming 1 November 18th 05 03:24 PM
Using a cell reference to select a worksheet within a macro Richard L Excel Programming 2 September 15th 05 04:25 PM
Select First Active Cell if the cell is in a pivot table Don Excel Programming 0 June 30th 04 01:53 PM


All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"