+ Reply to Thread
Results 1 to 5 of 5

Showing selected cell value

  1. #1
    Misssy
    Guest

    Showing selected cell value

    Is there a way I can show in one cell the value of whatever cell is selected?

  2. #2
    Ron de Bruin
    Guest

    Re: Showing selected cell value

    Hi Misssy

    You can use the SelectionChange event

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Range("A1").Value = Target.Value
    End Sub

    Read more about events on Chip Pearson's site.
    http://www.cpearson.com/excel/events.htm


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Misssy" <Misssy@discussions.microsoft.com> wrote in message news:56271CEF-182C-473B-80A3-B14BB23832E5@microsoft.com...
    > Is there a way I can show in one cell the value of whatever cell is selected?




  3. #3
    Bob Phillips
    Guest

    Re: Showing selected cell value

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Me.Range("H1").Value = Target.Value
    End Sub

    '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.


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Misssy" <Misssy@discussions.microsoft.com> wrote in message
    news:56271CEF-182C-473B-80A3-B14BB23832E5@microsoft.com...
    > Is there a way I can show in one cell the value of whatever cell is

    selected?



  4. #4
    sebastienm
    Guest

    RE: Showing selected cell value

    In the sheet module, say you want the value to be displayed in cell A1:
    '----------------------------------------------------
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    With Range("A1")
    .Value = ActiveCell.Value
    .NumberFormat = ActiveCell.NumberFormat
    End With
    End Sub
    '---------------------------------------------------
    --
    Regards,
    Sébastien
    <http://www.ondemandanalysis.com>


    "Misssy" wrote:

    > Is there a way I can show in one cell the value of whatever cell is selected?


  5. #5
    Misssy
    Guest

    Re: Showing selected cell value

    Thanks - All options work great!

    "Bob Phillips" wrote:

    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Me.Range("H1").Value = Target.Value
    > End Sub
    >
    > '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.
    >
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Misssy" <Misssy@discussions.microsoft.com> wrote in message
    > news:56271CEF-182C-473B-80A3-B14BB23832E5@microsoft.com...
    > > Is there a way I can show in one cell the value of whatever cell is

    > selected?
    >
    >
    >


+ 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