Hyperlink with copy value to target cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Sheet 2 Column 1 contains list of Items & Column 2 contains it's Price

Sheet 1 contains a programmed calculator for various options that are calculated based on pric

To make it more user-friendly, is it possible that when a Product (hyperlink) is clicked, the value fo the target cell (in sheet 1) is same as the cell (product) that was chose

I can then take up the value based on = lookup(

Thanx
 
Why do I get the feeling that your question requires a lawyer
to untangle the question. Can you perhaps type 15 lines
that includes an example of your tables and what you want.
 
David McRitchie said:
Why do I get the feeling that your question requires a lawyer
to untangle the question. Can you perhaps type 15 lines
that includes an example of your tables and what you want.

lol

Frank
 
Good that you answered your own question, but could you
enlighten us as to what the actual question is and answer is.
I'm sure we'd all benefit.
 
Hi

Had received the reply (lol), not the solution
The problem though is that if SAY

All cells in E1:E100 have hyperlink and the reference for all is A1, then in that case is it possible that A1 bears the value of the cell from which the link originate
Ex
If user clicks on E31 (Value of which is $120), then user will be led to A1 & value of A1 shall be equal to that of E3
If user clicks on E42 (Value of which is $1350), then user will be led to A1 & value of A1 shall be equal to that of E3

Thanx
 
correctio

If user clicks on E42 (Value of which is $1350), then user will be led to A1 & value of A1 shall be equal to that of E42
 
Hi Sachin,
If you hyperlink to a cell within Excel you can use the Back button (alt+ArrowLT)
just like in your browser. In fact you can install Cyan (/aqua) colored back and
forward buttons on your toolbar (tools, customize, Web (left), Button (right side)
-- drag each button to the toolbar.

I think you are creating a can of worms for yourself, by asking a cell to
show a value with no visible connection.

When you do a web search and come with only 6 hits, you know it's
not a very popular thing to do. But it looks like Frank Kabel already
answered your question. Which means you've posted in more than
one place..
http://www.excelforum.com/t204672-s

Anyway here is my take on your question, install the
following two event macros. One is for the hyperlink that you
asked for and the other is a doubleclick event macro, which
I think would work better for you if A1 is the only place to be updated.
http://www.mvps.org/dmcritchie/excel/event.htm


The following will do what you ask, if and only if, you assign
each hyperlink (object hyperlink) individually -- without using
the fill handle.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
' MsgBox "destination: target.subaddress " & Target.SubAddress
' MsgBox "Source: Target.Range.Address " & Target.Range.Address
' MsgBox "Source: Target.Range.Value " & Target.Range(1, 1).Value
Range(Target.SubAddress) = Target.Range(1, 1).Value
End Sub

'the Double-click event macro below would update cell A1 when you
' double-click form anywhere on the sheet.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Range("A1").Value = Target.Text
On Error Resume Next
Range("A1").AddComment
On Error GoTo 0
Range("A1").Comment.Visible = False
Range("A1").Comment.Text Text:="Value from: " & Target.Address(0, 0) _
& Chr(10) & Format(Now, "ddmmmyyyy hh:mm:ss")
Range("a1").Select
End Sub

to install the two event macros: right click on the sheet tab,
then plop the above code in

Summary of original request:
A1 (wants the value of the cell that last hyperlinked to here from E1:E100)
E42 $1350 hyperliknk to A1

E1:E100 .... all hypelink to A1

The problem is if you hyperlink E1:E100 as a group to A1, or if you
use the fill-handle to to link to $A$1 you get a range of E1:E100
or whatever you did your hyperlink from
--
When you said you had not received
an answer that does not appear to be the case. Frank answered you
in another thread and you thanked him. The reply that I answered
appears to be a question so I answered it after all you did say that
you did not get an answer.. .Please stick to your original
newsgroup and thread when you ask a question. I don't like
replying to anonymous posters, ,you can get a hotmail address
and use the hotmail facilities to protect it from spam and not
compromise your current email address. If it weren't for all the
spam, I would consider anonymous postings as very rude in
this type of newsgroup because it tends to imply give me an
answer and I don't wish to participate.

If you use a valid email address (i.e. hotmail address) then you can
look in the archives a few years later and find your conversations.
http://www.mvps.org/dmcritchie/excel/xlnews.htm

Suggest you not chose a hotmail address similar to your main
email address because spammers take
an email address and try variations with every different domain name.
So if they found you as (e-mail address removed) they would
send also to (e-mail address removed) and @msn.com and @hotmail.com
then again by dropping the number.

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Sachin said:
correction

If user clicks on E42 (Value of which is $1350), then user will be led to A1 & value of A1 shall be equal to that of E42

---
Had received the reply (lol), not the solution!
The problem though is that if SAY:

All cells in E1:E100 have hyperlink and the reference for all is A1, then in that case is it possible that A1 bears the value of the
cell from which the link originated
Ex:
If user clicks on E31 (Value of which is $120), then user will be led to A1 & value of A1 shall be equal to that of E31
If user clicks on E42 (Value of which is $1350), then user will be led to A1 & value of A1 shall be equal to that of E31
 
Thanx Davi

Excel does fulfil even the wildest imagination
Trust me, have never posted elsewher

Thanx agai

Sachin
 
Trust me, have never posted elsewhere

Sorry about that, there were a few similar questions
and I see that Frank's answer with code was to another
person's question.

It was interesting, I've put my posted replies into
http://www.mvps.org/dmcritchie/excel/event.htm#ws_fh
even though they are not all follow hyperlink. Wasn't too
happy about some of the aspects so I might rework them
another time.
 
Back
Top