Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Anthony Slater
 
Posts: n/a
Default Populating a cell when certain cell is clicked

In sheet 1, A1:A100, I have a list of serial numbers. The rest of the sheet
contains various information
In sheet 2 A1, I have a drop down list (using A1:A100) and then VLOOKUP's to
pull information from sheet 1.

So far so good

Is there a way of eliminating the drop down and populating the cell in sheet
2 by just clicking on the required number in sheet 1 A1:A100 ?

I know a hyperlink can take me to sheet 2 but not the value of the
hyperlinked cell

Any ideas?

TIA
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Anthony,

You could use the worksheet's selection - change event: Copy this code, and
right click the sheet tab, select "View Code", and paste into the window
that appears.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Range("A1:A100")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Worksheets("Sheet2").Range("A1").Value = Target.Value
Application.EnableEvents = True
End Sub

HTH,
Bernie
MS Excel MVP


"Anthony Slater" wrote in message
...
In sheet 1, A1:A100, I have a list of serial numbers. The rest of the

sheet
contains various information
In sheet 2 A1, I have a drop down list (using A1:A100) and then VLOOKUP's

to
pull information from sheet 1.

So far so good

Is there a way of eliminating the drop down and populating the cell in

sheet
2 by just clicking on the required number in sheet 1 A1:A100 ?

I know a hyperlink can take me to sheet 2 but not the value of the
hyperlinked cell

Any ideas?

TIA



  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

The short answer is 'Yes, using VBA.'

The long answer is that you'll need to be more explicit in describing your
goals if we're to be able to give you concise guidance.

How do you determine where on the 2d sheet the data will go?
How do you determine what cells to copy into the 2d sheet?
Is there any other important factor you haven't stated?




"Anthony Slater" wrote:

In sheet 1, A1:A100, I have a list of serial numbers. The rest of the sheet
contains various information
In sheet 2 A1, I have a drop down list (using A1:A100) and then VLOOKUP's to
pull information from sheet 1.

So far so good

Is there a way of eliminating the drop down and populating the cell in sheet
2 by just clicking on the required number in sheet 1 A1:A100 ?

I know a hyperlink can take me to sheet 2 but not the value of the
hyperlinked cell

Any ideas?

TIA

  #4   Report Post  
Anthony Slater
 
Posts: n/a
Default

Bernie

Thanks for that. That piece of code worked a treat

@Duke
I was going to reply to your post but Bernie answered and gave me the
solution i was looking for. Thank anyway for your support

"Bernie Deitrick" wrote:

Anthony,

You could use the worksheet's selection - change event: Copy this code, and
right click the sheet tab, select "View Code", and paste into the window
that appears.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Range("A1:A100")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Worksheets("Sheet2").Range("A1").Value = Target.Value
Application.EnableEvents = True
End Sub

HTH,
Bernie
MS Excel MVP


"Anthony Slater" wrote in message
...
In sheet 1, A1:A100, I have a list of serial numbers. The rest of the

sheet
contains various information
In sheet 2 A1, I have a drop down list (using A1:A100) and then VLOOKUP's

to
pull information from sheet 1.

So far so good

Is there a way of eliminating the drop down and populating the cell in

sheet
2 by just clicking on the required number in sheet 1 A1:A100 ?

I know a hyperlink can take me to sheet 2 but not the value of the
hyperlinked cell

Any ideas?

TIA




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
How can I get a cell locked if the condition is false? FareedAhmed76 Excel Worksheet Functions 1 February 18th 05 01:49 PM
Can a Formula in Cell X modify Cell Y? alMandragor Excel Discussion (Misc queries) 7 February 10th 05 09:51 PM
Problem with IF condition or vector lookup? J-Philippe Excel Worksheet Functions 4 January 15th 05 08:41 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


All times are GMT +1. The time now is 09:15 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"