Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jk jk is offline
external usenet poster
 
Posts: 109
Default Varying selected cells returning value always to the same cell

I would like to click or select a cell and the value in that cell show up in
another cell. Or in other words anytime I select a cell the value of that
cell will shop up always in the same cell. I could click on 20 different
cells (one at a time) but no matter what cell I click on or have selected
that value will show up in the same cell I chose it to. Something like a
@cell selected, @cell pointer, +cell selected, +cell pointer, etc. I want to
use this in conjunction with an @vlookup. So instead of keying in the number
I am trying to do a lookup on I can just select a cell with that number in it.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Varying selected cells returning value always to the same cell

Put the following worksheet event macro in the worksheet code area:

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

The value on any cell you select (either by mouse or arrow keys) will appear
in B9.


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200814


"jk" wrote:

I would like to click or select a cell and the value in that cell show up in
another cell. Or in other words anytime I select a cell the value of that
cell will shop up always in the same cell. I could click on 20 different
cells (one at a time) but no matter what cell I click on or have selected
that value will show up in the same cell I chose it to. Something like a
@cell selected, @cell pointer, +cell selected, +cell pointer, etc. I want to
use this in conjunction with an @vlookup. So instead of keying in the number
I am trying to do a lookup on I can just select a cell with that number in it.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Varying selected cells returning value always to the same cell

Only if you are ready to use VBA
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"jk" wrote in message
...
I would like to click or select a cell and the value in that cell show up
in
another cell. Or in other words anytime I select a cell the value of that
cell will shop up always in the same cell. I could click on 20 different
cells (one at a time) but no matter what cell I click on or have selected
that value will show up in the same cell I chose it to. Something like a
@cell selected, @cell pointer, +cell selected, +cell pointer, etc. I want
to
use this in conjunction with an @vlookup. So instead of keying in the
number
I am trying to do a lookup on I can just select a cell with that number in
it.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Varying selected cells returning value always to the same cell

Hi,

You don't provide too many clues about ranges but this may get you started.
Right click your sheet tab, view code and paste the code below in. If you
select a numeric cell in the range a1 - a100 the value will show up in B1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A100")) _
Is Nothing And IsNumeric(Target.Value) Then
Range("B1").Value = Target.Value
End If
End Sub

Mike

"jk" wrote:

I would like to click or select a cell and the value in that cell show up in
another cell. Or in other words anytime I select a cell the value of that
cell will shop up always in the same cell. I could click on 20 different
cells (one at a time) but no matter what cell I click on or have selected
that value will show up in the same cell I chose it to. Something like a
@cell selected, @cell pointer, +cell selected, +cell pointer, etc. I want to
use this in conjunction with an @vlookup. So instead of keying in the number
I am trying to do a lookup on I can just select a cell with that number in it.

Reply
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
why do multiple cells get selected when i click only one cell? Colie Excel Discussion (Misc queries) 8 October 13th 08 04:47 PM
Click on single cell, multiple cells are selected. WDW Excel Discussion (Misc queries) 17 May 30th 08 10:57 PM
Returning a value in one cell from values in two other cells Fello Excel Worksheet Functions 2 September 15th 07 01:04 PM
Last non blank cell in selected cells Ron Weaver Excel Worksheet Functions 11 January 29th 07 03:29 AM
selected extraction of cell ref in a series of cells in a row/colu romelsb Excel Worksheet Functions 0 November 3rd 06 10:37 PM


All times are GMT +1. The time now is 03:58 PM.

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"