+ Reply to Thread
Results 1 to 13 of 13

link a cell in the 'Master' worksheet list to a 'Detail' worksheet

Hybrid View

Guest link a cell in the 'Master'... 04-24-2006, 07:35 AM
Guest Re: link a cell in the... 04-24-2006, 07:45 AM
Guest Re: link a cell in the... 04-24-2006, 09:55 AM
Guest Re: link a cell in the... 04-24-2006, 10:20 AM
Guest Re: link a cell in the... 04-24-2006, 11:20 AM
Guest Re: link a cell in the... 04-24-2006, 12:10 PM
Guest Re: link a cell in the... 04-24-2006, 03:10 PM
Guest Re: link a cell in the... 04-24-2006, 03:10 PM
Guest Re: link a cell in the... 04-24-2006, 03:25 PM
Guest Re: link a cell in the... 04-24-2006, 03:25 PM
Guest Re: link a cell in the... 04-24-2006, 03:25 PM
Guest Re: link a cell in the... 07-16-2006, 12:20 PM
Guest Re: link a cell in the... 07-16-2006, 05:45 PM
  1. #1
    Bob Phillips
    Guest

    Re: link a cell in the 'Master' worksheet list to a 'Detail' works

    Paul,

    Maybe you need an event macro that works upon selecting a cell with a sheet
    name in it. I have used columns C:F for those names, you can change to suit.

    'This is worksheet event code, which means that it needs to be
    'placed in the appropriate worksheet code module, not a standard
    'code module. To do this, right-click on the sheet tab, select
    'the View Code option from the menu, and paste the code in.


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Const WS_RANGE As String = "C:F"
    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    If Target.Value <> "" Then
    Worksheets(Tragte.Value).Activate
    ActiveSheet.Range("A1").Select
    End If
    End If
    End Sub


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in message
    news:AEE214F6-92CB-4019-B463-30F4BF56B580@microsoft.com...
    > Bob,
    > thanks again but I obviously haven't explained my problem correctly and

    what
    > you sent me won't work. I'll try again because this is really getting to

    me
    > (and hope you still have the patience to reply!!)!!
    >
    > On Worksheet 1 - my 'Master' or 'Front-end' WS, I have a listing of the
    > companies whose details will be shown on other Worksheets within this
    > Workbook. This list has 4 columns and I want one specific one of these to

    be
    > a link to its associated Worksheet so that when I reference this cell in a
    > GoTo macro, it will go to cell A1 of that particular Worksheet. I'm

    assuming
    > that if the macro is created as 'relative' that it will take me to the

    sheet
    > that relates to the list entry being highlighted on the 'Master' WS.
    > The list on the Master WS will be expanded as time goes on and so this
    > automatic link to the associated detail sheet is a key part to making it

    work.
    > Once again, my thanks for any help I get.
    > Paul
    >
    > "Bob Phillips" wrote:
    >
    > > I omitted the trailing quote. You don't need to substitute the cell

    value,
    > > Excel will do that, so use
    > >
    > > =INDIRECT("'"&A2&"'!A1")
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > (remove nothere from email address if mailing direct)
    > >
    > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in message
    > > news:B1F5CC4F-7258-488D-9304-7048C6BA70B9@microsoft.com...
    > > > Chip,
    > > >
    > > > Thanks. I followed this exactly - I think but it still tells me I have

    an
    > > > error. The particular worksheet I tried it on is labelled -

    Accel_Lifts -
    > > > and so I got:
    > > >
    > > > =INDIRECT("'"&Accel_Lifts&"'"!A1)
    > > >
    > > > But it comes up as a syntax error!
    > > >
    > > > Paul
    > > >
    > > > "Chip Pearson" wrote:
    > > >
    > > > > Paul,
    > > > >
    > > > > The syntax is
    > > > >
    > > > > =INDIRECT(double-quote single-quote double-quote & A2 &
    > > > > double-quote single-quote double-quote ! A1 )
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in
    > > > > message
    > > > > news:887D6FF3-D552-4942-A551-0F99A11730F1@microsoft.com...
    > > > > > Bob,
    > > > > >
    > > > > > Many thanks but I can't get this to work. I have played around
    > > > > > with the " '
    > > > > > and ( ) but I can't seem to get the logic right. I also tried
    > > > > > to insert a ,
    > > > > > before A1 but that didn't seem to help either. I'm probably
    > > > > > doing something
    > > > > > stupid!
    > > > > > Regards
    > > > > > Paul
    > > > > >
    > > > > > "Bob Phillips" wrote:
    > > > > >
    > > > > >> =INDIRECT("'"&A2&"'!A1)
    > > > > >>
    > > > > >> where A2 holds the sheet name
    > > > > >>
    > > > > >> --
    > > > > >> HTH
    > > > > >>
    > > > > >> Bob Phillips
    > > > > >>
    > > > > >> (remove nothere from email address if mailing direct)
    > > > > >>
    > > > > >> "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote
    > > > > >> in message
    > > > > >> news:374FB5AC-5BA2-4BE4-A999-4CC875481941@microsoft.com...
    > > > > >> > I have a 'Master' worksheet containing a list of the other
    > > > > >> > worksheets in
    > > > > >> this
    > > > > >> > workbook. The list will be added to regularly. I want to
    > > > > >> > create a macro
    > > > > >> that
    > > > > >> > when run will take the worksheet name that is highlighted in
    > > > > >> > the 'master'
    > > > > >> > list and GoTo cell A1 on the related 'Detail' sheet.
    > > > > >> > Any help would be much appreciated.
    > > > > >>
    > > > > >>
    > > > > >>
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >




  2. #2
    Paul Condron
    Guest

    Re: link a cell in the 'Master' worksheet list to a 'Detail' works

    Bob,
    Thank you. I will play with this until I get it right. You have been a great
    help.
    Paul

    "Bob Phillips" wrote:

    > Paul,
    >
    > Maybe you need an event macro that works upon selecting a cell with a sheet
    > name in it. I have used columns C:F for those names, you can change to suit.
    >
    > 'This is worksheet event code, which means that it needs to be
    > 'placed in the appropriate worksheet code module, not a standard
    > 'code module. To do this, right-click on the sheet tab, select
    > 'the View Code option from the menu, and paste the code in.
    >
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Const WS_RANGE As String = "C:F"
    > If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    > If Target.Value <> "" Then
    > Worksheets(Tragte.Value).Activate
    > ActiveSheet.Range("A1").Select
    > End If
    > End If
    > End Sub
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in message
    > news:AEE214F6-92CB-4019-B463-30F4BF56B580@microsoft.com...
    > > Bob,
    > > thanks again but I obviously haven't explained my problem correctly and

    > what
    > > you sent me won't work. I'll try again because this is really getting to

    > me
    > > (and hope you still have the patience to reply!!)!!
    > >
    > > On Worksheet 1 - my 'Master' or 'Front-end' WS, I have a listing of the
    > > companies whose details will be shown on other Worksheets within this
    > > Workbook. This list has 4 columns and I want one specific one of these to

    > be
    > > a link to its associated Worksheet so that when I reference this cell in a
    > > GoTo macro, it will go to cell A1 of that particular Worksheet. I'm

    > assuming
    > > that if the macro is created as 'relative' that it will take me to the

    > sheet
    > > that relates to the list entry being highlighted on the 'Master' WS.
    > > The list on the Master WS will be expanded as time goes on and so this
    > > automatic link to the associated detail sheet is a key part to making it

    > work.
    > > Once again, my thanks for any help I get.
    > > Paul
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > I omitted the trailing quote. You don't need to substitute the cell

    > value,
    > > > Excel will do that, so use
    > > >
    > > > =INDIRECT("'"&A2&"'!A1")
    > > >
    > > > --
    > > > HTH
    > > >
    > > > Bob Phillips
    > > >
    > > > (remove nothere from email address if mailing direct)
    > > >
    > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in message
    > > > news:B1F5CC4F-7258-488D-9304-7048C6BA70B9@microsoft.com...
    > > > > Chip,
    > > > >
    > > > > Thanks. I followed this exactly - I think but it still tells me I have

    > an
    > > > > error. The particular worksheet I tried it on is labelled -

    > Accel_Lifts -
    > > > > and so I got:
    > > > >
    > > > > =INDIRECT("'"&Accel_Lifts&"'"!A1)
    > > > >
    > > > > But it comes up as a syntax error!
    > > > >
    > > > > Paul
    > > > >
    > > > > "Chip Pearson" wrote:
    > > > >
    > > > > > Paul,
    > > > > >
    > > > > > The syntax is
    > > > > >
    > > > > > =INDIRECT(double-quote single-quote double-quote & A2 &
    > > > > > double-quote single-quote double-quote ! A1 )
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in
    > > > > > message
    > > > > > news:887D6FF3-D552-4942-A551-0F99A11730F1@microsoft.com...
    > > > > > > Bob,
    > > > > > >
    > > > > > > Many thanks but I can't get this to work. I have played around
    > > > > > > with the " '
    > > > > > > and ( ) but I can't seem to get the logic right. I also tried
    > > > > > > to insert a ,
    > > > > > > before A1 but that didn't seem to help either. I'm probably
    > > > > > > doing something
    > > > > > > stupid!
    > > > > > > Regards
    > > > > > > Paul
    > > > > > >
    > > > > > > "Bob Phillips" wrote:
    > > > > > >
    > > > > > >> =INDIRECT("'"&A2&"'!A1)
    > > > > > >>
    > > > > > >> where A2 holds the sheet name
    > > > > > >>
    > > > > > >> --
    > > > > > >> HTH
    > > > > > >>
    > > > > > >> Bob Phillips
    > > > > > >>
    > > > > > >> (remove nothere from email address if mailing direct)
    > > > > > >>
    > > > > > >> "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote
    > > > > > >> in message
    > > > > > >> news:374FB5AC-5BA2-4BE4-A999-4CC875481941@microsoft.com...
    > > > > > >> > I have a 'Master' worksheet containing a list of the other
    > > > > > >> > worksheets in
    > > > > > >> this
    > > > > > >> > workbook. The list will be added to regularly. I want to
    > > > > > >> > create a macro
    > > > > > >> that
    > > > > > >> > when run will take the worksheet name that is highlighted in
    > > > > > >> > the 'master'
    > > > > > >> > list and GoTo cell A1 on the related 'Detail' sheet.
    > > > > > >> > Any help would be much appreciated.
    > > > > > >>
    > > > > > >>
    > > > > > >>
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >
    >


  3. #3
    Bob Phillips
    Guest

    Re: link a cell in the 'Master' worksheet list to a 'Detail' works

    Typo


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    news:uL$x1I9ZGHA.4620@TK2MSFTNGP04.phx.gbl...
    > Paul,
    >
    > Maybe you need an event macro that works upon selecting a cell with a

    sheet
    > name in it. I have used columns C:F for those names, you can change to

    suit.
    >
    > 'This is worksheet event code, which means that it needs to be
    > 'placed in the appropriate worksheet code module, not a standard
    > 'code module. To do this, right-click on the sheet tab, select
    > 'the View Code option from the menu, and paste the code in.
    >
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Const WS_RANGE As String = "C:F"
    > If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    > If Target.Value <> "" Then
    > Worksheets(Tragte.Value).Activate
    > ActiveSheet.Range("A1").Select
    > End If
    > End If
    > End Sub
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in message
    > news:AEE214F6-92CB-4019-B463-30F4BF56B580@microsoft.com...
    > > Bob,
    > > thanks again but I obviously haven't explained my problem correctly and

    > what
    > > you sent me won't work. I'll try again because this is really getting to

    > me
    > > (and hope you still have the patience to reply!!)!!
    > >
    > > On Worksheet 1 - my 'Master' or 'Front-end' WS, I have a listing of the
    > > companies whose details will be shown on other Worksheets within this
    > > Workbook. This list has 4 columns and I want one specific one of these

    to
    > be
    > > a link to its associated Worksheet so that when I reference this cell in

    a
    > > GoTo macro, it will go to cell A1 of that particular Worksheet. I'm

    > assuming
    > > that if the macro is created as 'relative' that it will take me to the

    > sheet
    > > that relates to the list entry being highlighted on the 'Master' WS.
    > > The list on the Master WS will be expanded as time goes on and so this
    > > automatic link to the associated detail sheet is a key part to making it

    > work.
    > > Once again, my thanks for any help I get.
    > > Paul
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > I omitted the trailing quote. You don't need to substitute the cell

    > value,
    > > > Excel will do that, so use
    > > >
    > > > =INDIRECT("'"&A2&"'!A1")
    > > >
    > > > --
    > > > HTH
    > > >
    > > > Bob Phillips
    > > >
    > > > (remove nothere from email address if mailing direct)
    > > >
    > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in

    message
    > > > news:B1F5CC4F-7258-488D-9304-7048C6BA70B9@microsoft.com...
    > > > > Chip,
    > > > >
    > > > > Thanks. I followed this exactly - I think but it still tells me I

    have
    > an
    > > > > error. The particular worksheet I tried it on is labelled -

    > Accel_Lifts -
    > > > > and so I got:
    > > > >
    > > > > =INDIRECT("'"&Accel_Lifts&"'"!A1)
    > > > >
    > > > > But it comes up as a syntax error!
    > > > >
    > > > > Paul
    > > > >
    > > > > "Chip Pearson" wrote:
    > > > >
    > > > > > Paul,
    > > > > >
    > > > > > The syntax is
    > > > > >
    > > > > > =INDIRECT(double-quote single-quote double-quote & A2 &
    > > > > > double-quote single-quote double-quote ! A1 )
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in
    > > > > > message
    > > > > > news:887D6FF3-D552-4942-A551-0F99A11730F1@microsoft.com...
    > > > > > > Bob,
    > > > > > >
    > > > > > > Many thanks but I can't get this to work. I have played around
    > > > > > > with the " '
    > > > > > > and ( ) but I can't seem to get the logic right. I also tried
    > > > > > > to insert a ,
    > > > > > > before A1 but that didn't seem to help either. I'm probably
    > > > > > > doing something
    > > > > > > stupid!
    > > > > > > Regards
    > > > > > > Paul
    > > > > > >
    > > > > > > "Bob Phillips" wrote:
    > > > > > >
    > > > > > >> =INDIRECT("'"&A2&"'!A1)
    > > > > > >>
    > > > > > >> where A2 holds the sheet name
    > > > > > >>
    > > > > > >> --
    > > > > > >> HTH
    > > > > > >>
    > > > > > >> Bob Phillips
    > > > > > >>
    > > > > > >> (remove nothere from email address if mailing direct)
    > > > > > >>
    > > > > > >> "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote
    > > > > > >> in message
    > > > > > >> news:374FB5AC-5BA2-4BE4-A999-4CC875481941@microsoft.com...
    > > > > > >> > I have a 'Master' worksheet containing a list of the other
    > > > > > >> > worksheets in
    > > > > > >> this
    > > > > > >> > workbook. The list will be added to regularly. I want to
    > > > > > >> > create a macro
    > > > > > >> that
    > > > > > >> > when run will take the worksheet name that is highlighted in
    > > > > > >> > the 'master'
    > > > > > >> > list and GoTo cell A1 on the related 'Detail' sheet.
    > > > > > >> > Any help would be much appreciated.
    > > > > > >>
    > > > > > >>
    > > > > > >>
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >




  4. #4
    Bob Phillips
    Guest

    Re: link a cell in the 'Master' worksheet list to a 'Detail' works

    Typo

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Const WS_RANGE As String = "C:F"
    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    If Target.Value <> "" Then
    Worksheets(Target.Value).Activate
    ActiveSheet.Range("A1").Select
    End If
    End If
    End Sub

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    news:uL$x1I9ZGHA.4620@TK2MSFTNGP04.phx.gbl...
    > Paul,
    >
    > Maybe you need an event macro that works upon selecting a cell with a

    sheet
    > name in it. I have used columns C:F for those names, you can change to

    suit.
    >
    > 'This is worksheet event code, which means that it needs to be
    > 'placed in the appropriate worksheet code module, not a standard
    > 'code module. To do this, right-click on the sheet tab, select
    > 'the View Code option from the menu, and paste the code in.
    >
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Const WS_RANGE As String = "C:F"
    > If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    > If Target.Value <> "" Then
    > Worksheets(Tragte.Value).Activate
    > ActiveSheet.Range("A1").Select
    > End If
    > End If
    > End Sub
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in message
    > news:AEE214F6-92CB-4019-B463-30F4BF56B580@microsoft.com...
    > > Bob,
    > > thanks again but I obviously haven't explained my problem correctly and

    > what
    > > you sent me won't work. I'll try again because this is really getting to

    > me
    > > (and hope you still have the patience to reply!!)!!
    > >
    > > On Worksheet 1 - my 'Master' or 'Front-end' WS, I have a listing of the
    > > companies whose details will be shown on other Worksheets within this
    > > Workbook. This list has 4 columns and I want one specific one of these

    to
    > be
    > > a link to its associated Worksheet so that when I reference this cell in

    a
    > > GoTo macro, it will go to cell A1 of that particular Worksheet. I'm

    > assuming
    > > that if the macro is created as 'relative' that it will take me to the

    > sheet
    > > that relates to the list entry being highlighted on the 'Master' WS.
    > > The list on the Master WS will be expanded as time goes on and so this
    > > automatic link to the associated detail sheet is a key part to making it

    > work.
    > > Once again, my thanks for any help I get.
    > > Paul
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > I omitted the trailing quote. You don't need to substitute the cell

    > value,
    > > > Excel will do that, so use
    > > >
    > > > =INDIRECT("'"&A2&"'!A1")
    > > >
    > > > --
    > > > HTH
    > > >
    > > > Bob Phillips
    > > >
    > > > (remove nothere from email address if mailing direct)
    > > >
    > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in

    message
    > > > news:B1F5CC4F-7258-488D-9304-7048C6BA70B9@microsoft.com...
    > > > > Chip,
    > > > >
    > > > > Thanks. I followed this exactly - I think but it still tells me I

    have
    > an
    > > > > error. The particular worksheet I tried it on is labelled -

    > Accel_Lifts -
    > > > > and so I got:
    > > > >
    > > > > =INDIRECT("'"&Accel_Lifts&"'"!A1)
    > > > >
    > > > > But it comes up as a syntax error!
    > > > >
    > > > > Paul
    > > > >
    > > > > "Chip Pearson" wrote:
    > > > >
    > > > > > Paul,
    > > > > >
    > > > > > The syntax is
    > > > > >
    > > > > > =INDIRECT(double-quote single-quote double-quote & A2 &
    > > > > > double-quote single-quote double-quote ! A1 )
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in
    > > > > > message
    > > > > > news:887D6FF3-D552-4942-A551-0F99A11730F1@microsoft.com...
    > > > > > > Bob,
    > > > > > >
    > > > > > > Many thanks but I can't get this to work. I have played around
    > > > > > > with the " '
    > > > > > > and ( ) but I can't seem to get the logic right. I also tried
    > > > > > > to insert a ,
    > > > > > > before A1 but that didn't seem to help either. I'm probably
    > > > > > > doing something
    > > > > > > stupid!
    > > > > > > Regards
    > > > > > > Paul
    > > > > > >
    > > > > > > "Bob Phillips" wrote:
    > > > > > >
    > > > > > >> =INDIRECT("'"&A2&"'!A1)
    > > > > > >>
    > > > > > >> where A2 holds the sheet name
    > > > > > >>
    > > > > > >> --
    > > > > > >> HTH
    > > > > > >>
    > > > > > >> Bob Phillips
    > > > > > >>
    > > > > > >> (remove nothere from email address if mailing direct)
    > > > > > >>
    > > > > > >> "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote
    > > > > > >> in message
    > > > > > >> news:374FB5AC-5BA2-4BE4-A999-4CC875481941@microsoft.com...
    > > > > > >> > I have a 'Master' worksheet containing a list of the other
    > > > > > >> > worksheets in
    > > > > > >> this
    > > > > > >> > workbook. The list will be added to regularly. I want to
    > > > > > >> > create a macro
    > > > > > >> that
    > > > > > >> > when run will take the worksheet name that is highlighted in
    > > > > > >> > the 'master'
    > > > > > >> > list and GoTo cell A1 on the related 'Detail' sheet.
    > > > > > >> > Any help would be much appreciated.
    > > > > > >>
    > > > > > >>
    > > > > > >>
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >




  5. #5
    Mike Punko
    Guest

    Re: link a cell in the 'Master' worksheet list to a 'Detail' works

    Hey guys I like this code but I need it to look at just Column B for teh
    Sheet names.

    "Bob Phillips" wrote:

    > Typo
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Const WS_RANGE As String = "C:F"
    > If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    > If Target.Value <> "" Then
    > Worksheets(Target.Value).Activate
    > ActiveSheet.Range("A1").Select
    > End If
    > End If
    > End Sub
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    > news:uL$x1I9ZGHA.4620@TK2MSFTNGP04.phx.gbl...
    > > Paul,
    > >
    > > Maybe you need an event macro that works upon selecting a cell with a

    > sheet
    > > name in it. I have used columns C:F for those names, you can change to

    > suit.
    > >
    > > 'This is worksheet event code, which means that it needs to be
    > > 'placed in the appropriate worksheet code module, not a standard
    > > 'code module. To do this, right-click on the sheet tab, select
    > > 'the View Code option from the menu, and paste the code in.
    > >
    > >
    > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > > Const WS_RANGE As String = "C:F"
    > > If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    > > If Target.Value <> "" Then
    > > Worksheets(Tragte.Value).Activate
    > > ActiveSheet.Range("A1").Select
    > > End If
    > > End If
    > > End Sub
    > >
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > (remove nothere from email address if mailing direct)
    > >
    > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in message
    > > news:AEE214F6-92CB-4019-B463-30F4BF56B580@microsoft.com...
    > > > Bob,
    > > > thanks again but I obviously haven't explained my problem correctly and

    > > what
    > > > you sent me won't work. I'll try again because this is really getting to

    > > me
    > > > (and hope you still have the patience to reply!!)!!
    > > >
    > > > On Worksheet 1 - my 'Master' or 'Front-end' WS, I have a listing of the
    > > > companies whose details will be shown on other Worksheets within this
    > > > Workbook. This list has 4 columns and I want one specific one of these

    > to
    > > be
    > > > a link to its associated Worksheet so that when I reference this cell in

    > a
    > > > GoTo macro, it will go to cell A1 of that particular Worksheet. I'm

    > > assuming
    > > > that if the macro is created as 'relative' that it will take me to the

    > > sheet
    > > > that relates to the list entry being highlighted on the 'Master' WS.
    > > > The list on the Master WS will be expanded as time goes on and so this
    > > > automatic link to the associated detail sheet is a key part to making it

    > > work.
    > > > Once again, my thanks for any help I get.
    > > > Paul
    > > >
    > > > "Bob Phillips" wrote:
    > > >
    > > > > I omitted the trailing quote. You don't need to substitute the cell

    > > value,
    > > > > Excel will do that, so use
    > > > >
    > > > > =INDIRECT("'"&A2&"'!A1")
    > > > >
    > > > > --
    > > > > HTH
    > > > >
    > > > > Bob Phillips
    > > > >
    > > > > (remove nothere from email address if mailing direct)
    > > > >
    > > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in

    > message
    > > > > news:B1F5CC4F-7258-488D-9304-7048C6BA70B9@microsoft.com...
    > > > > > Chip,
    > > > > >
    > > > > > Thanks. I followed this exactly - I think but it still tells me I

    > have
    > > an
    > > > > > error. The particular worksheet I tried it on is labelled -

    > > Accel_Lifts -
    > > > > > and so I got:
    > > > > >
    > > > > > =INDIRECT("'"&Accel_Lifts&"'"!A1)
    > > > > >
    > > > > > But it comes up as a syntax error!
    > > > > >
    > > > > > Paul
    > > > > >
    > > > > > "Chip Pearson" wrote:
    > > > > >
    > > > > > > Paul,
    > > > > > >
    > > > > > > The syntax is
    > > > > > >
    > > > > > > =INDIRECT(double-quote single-quote double-quote & A2 &
    > > > > > > double-quote single-quote double-quote ! A1 )
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in
    > > > > > > message
    > > > > > > news:887D6FF3-D552-4942-A551-0F99A11730F1@microsoft.com...
    > > > > > > > Bob,
    > > > > > > >
    > > > > > > > Many thanks but I can't get this to work. I have played around
    > > > > > > > with the " '
    > > > > > > > and ( ) but I can't seem to get the logic right. I also tried
    > > > > > > > to insert a ,
    > > > > > > > before A1 but that didn't seem to help either. I'm probably
    > > > > > > > doing something
    > > > > > > > stupid!
    > > > > > > > Regards
    > > > > > > > Paul
    > > > > > > >
    > > > > > > > "Bob Phillips" wrote:
    > > > > > > >
    > > > > > > >> =INDIRECT("'"&A2&"'!A1)
    > > > > > > >>
    > > > > > > >> where A2 holds the sheet name
    > > > > > > >>
    > > > > > > >> --
    > > > > > > >> HTH
    > > > > > > >>
    > > > > > > >> Bob Phillips
    > > > > > > >>
    > > > > > > >> (remove nothere from email address if mailing direct)
    > > > > > > >>
    > > > > > > >> "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote
    > > > > > > >> in message
    > > > > > > >> news:374FB5AC-5BA2-4BE4-A999-4CC875481941@microsoft.com...
    > > > > > > >> > I have a 'Master' worksheet containing a list of the other
    > > > > > > >> > worksheets in
    > > > > > > >> this
    > > > > > > >> > workbook. The list will be added to regularly. I want to
    > > > > > > >> > create a macro
    > > > > > > >> that
    > > > > > > >> > when run will take the worksheet name that is highlighted in
    > > > > > > >> > the 'master'
    > > > > > > >> > list and GoTo cell A1 on the related 'Detail' sheet.
    > > > > > > >> > Any help would be much appreciated.
    > > > > > > >>
    > > > > > > >>
    > > > > > > >>
    > > > > > >
    > > > > > >
    > > > > > >
    > > > >
    > > > >
    > > > >

    > >
    > >

    >
    >
    >


  6. #6
    Tom Ogilvy
    Guest

    Re: link a cell in the 'Master' worksheet list to a 'Detail' works

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Const WS_RANGE As String = "B:B"
    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    If Target.Value <> "" Then
    Worksheets(Target.Value).Activate
    ActiveSheet.Range("A1").Select
    End If
    End If
    End Sub

    --
    Regards,
    Tom Ogilvy

    "Mike Punko" <MikePunko@discussions.microsoft.com> wrote in message
    news:076C9E5D-E1CB-4314-8085-55D9D4D56770@microsoft.com...
    > Hey guys I like this code but I need it to look at just Column B for teh
    > Sheet names.
    >
    > "Bob Phillips" wrote:
    >
    >> Typo
    >>
    >> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    >> Const WS_RANGE As String = "C:F"
    >> If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    >> If Target.Value <> "" Then
    >> Worksheets(Target.Value).Activate
    >> ActiveSheet.Range("A1").Select
    >> End If
    >> End If
    >> End Sub
    >>
    >> --
    >> HTH
    >>
    >> Bob Phillips
    >>
    >> (remove nothere from email address if mailing direct)
    >>
    >> "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    >> news:uL$x1I9ZGHA.4620@TK2MSFTNGP04.phx.gbl...
    >> > Paul,
    >> >
    >> > Maybe you need an event macro that works upon selecting a cell with a

    >> sheet
    >> > name in it. I have used columns C:F for those names, you can change to

    >> suit.
    >> >
    >> > 'This is worksheet event code, which means that it needs to be
    >> > 'placed in the appropriate worksheet code module, not a standard
    >> > 'code module. To do this, right-click on the sheet tab, select
    >> > 'the View Code option from the menu, and paste the code in.
    >> >
    >> >
    >> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    >> > Const WS_RANGE As String = "C:F"
    >> > If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    >> > If Target.Value <> "" Then
    >> > Worksheets(Tragte.Value).Activate
    >> > ActiveSheet.Range("A1").Select
    >> > End If
    >> > End If
    >> > End Sub
    >> >
    >> >
    >> > --
    >> > HTH
    >> >
    >> > Bob Phillips
    >> >
    >> > (remove nothere from email address if mailing direct)
    >> >
    >> > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in message
    >> > news:AEE214F6-92CB-4019-B463-30F4BF56B580@microsoft.com...
    >> > > Bob,
    >> > > thanks again but I obviously haven't explained my problem correctly
    >> > > and
    >> > what
    >> > > you sent me won't work. I'll try again because this is really getting
    >> > > to
    >> > me
    >> > > (and hope you still have the patience to reply!!)!!
    >> > >
    >> > > On Worksheet 1 - my 'Master' or 'Front-end' WS, I have a listing of
    >> > > the
    >> > > companies whose details will be shown on other Worksheets within this
    >> > > Workbook. This list has 4 columns and I want one specific one of
    >> > > these

    >> to
    >> > be
    >> > > a link to its associated Worksheet so that when I reference this cell
    >> > > in

    >> a
    >> > > GoTo macro, it will go to cell A1 of that particular Worksheet. I'm
    >> > assuming
    >> > > that if the macro is created as 'relative' that it will take me to
    >> > > the
    >> > sheet
    >> > > that relates to the list entry being highlighted on the 'Master' WS.
    >> > > The list on the Master WS will be expanded as time goes on and so
    >> > > this
    >> > > automatic link to the associated detail sheet is a key part to making
    >> > > it
    >> > work.
    >> > > Once again, my thanks for any help I get.
    >> > > Paul
    >> > >
    >> > > "Bob Phillips" wrote:
    >> > >
    >> > > > I omitted the trailing quote. You don't need to substitute the cell
    >> > value,
    >> > > > Excel will do that, so use
    >> > > >
    >> > > > =INDIRECT("'"&A2&"'!A1")
    >> > > >
    >> > > > --
    >> > > > HTH
    >> > > >
    >> > > > Bob Phillips
    >> > > >
    >> > > > (remove nothere from email address if mailing direct)
    >> > > >
    >> > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in

    >> message
    >> > > > news:B1F5CC4F-7258-488D-9304-7048C6BA70B9@microsoft.com...
    >> > > > > Chip,
    >> > > > >
    >> > > > > Thanks. I followed this exactly - I think but it still tells me I

    >> have
    >> > an
    >> > > > > error. The particular worksheet I tried it on is labelled -
    >> > Accel_Lifts -
    >> > > > > and so I got:
    >> > > > >
    >> > > > > =INDIRECT("'"&Accel_Lifts&"'"!A1)
    >> > > > >
    >> > > > > But it comes up as a syntax error!
    >> > > > >
    >> > > > > Paul
    >> > > > >
    >> > > > > "Chip Pearson" wrote:
    >> > > > >
    >> > > > > > Paul,
    >> > > > > >
    >> > > > > > The syntax is
    >> > > > > >
    >> > > > > > =INDIRECT(double-quote single-quote double-quote & A2 &
    >> > > > > > double-quote single-quote double-quote ! A1 )
    >> > > > > >
    >> > > > > >
    >> > > > > >
    >> > > > > >
    >> > > > > >
    >> > > > > > "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote in
    >> > > > > > message
    >> > > > > > news:887D6FF3-D552-4942-A551-0F99A11730F1@microsoft.com...
    >> > > > > > > Bob,
    >> > > > > > >
    >> > > > > > > Many thanks but I can't get this to work. I have played
    >> > > > > > > around
    >> > > > > > > with the " '
    >> > > > > > > and ( ) but I can't seem to get the logic right. I also tried
    >> > > > > > > to insert a ,
    >> > > > > > > before A1 but that didn't seem to help either. I'm probably
    >> > > > > > > doing something
    >> > > > > > > stupid!
    >> > > > > > > Regards
    >> > > > > > > Paul
    >> > > > > > >
    >> > > > > > > "Bob Phillips" wrote:
    >> > > > > > >
    >> > > > > > >> =INDIRECT("'"&A2&"'!A1)
    >> > > > > > >>
    >> > > > > > >> where A2 holds the sheet name
    >> > > > > > >>
    >> > > > > > >> --
    >> > > > > > >> HTH
    >> > > > > > >>
    >> > > > > > >> Bob Phillips
    >> > > > > > >>
    >> > > > > > >> (remove nothere from email address if mailing direct)
    >> > > > > > >>
    >> > > > > > >> "Paul Condron" <PaulCondron@discussions.microsoft.com> wrote
    >> > > > > > >> in message
    >> > > > > > >> news:374FB5AC-5BA2-4BE4-A999-4CC875481941@microsoft.com...
    >> > > > > > >> > I have a 'Master' worksheet containing a list of the other
    >> > > > > > >> > worksheets in
    >> > > > > > >> this
    >> > > > > > >> > workbook. The list will be added to regularly. I want to
    >> > > > > > >> > create a macro
    >> > > > > > >> that
    >> > > > > > >> > when run will take the worksheet name that is highlighted
    >> > > > > > >> > in
    >> > > > > > >> > the 'master'
    >> > > > > > >> > list and GoTo cell A1 on the related 'Detail' sheet.
    >> > > > > > >> > Any help would be much appreciated.
    >> > > > > > >>
    >> > > > > > >>
    >> > > > > > >>
    >> > > > > >
    >> > > > > >
    >> > > > > >
    >> > > >
    >> > > >
    >> > > >
    >> >
    >> >

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1