New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Hyperlink from one cell to another in 2010

Macros, VBA, Excel Automation, etc.

Hyperlink from one cell to another in 2010

Postby lawitcher1 » Tue Nov 24, 2015 3:59 pm

I have a worksheet that I want to click on a cell (highlighted in grey) at the top of the sheet (named: 10, 12, 15, 17, 20, 70, 40, 60, 80, 180 & Back to Log (back to log refers to the station log sheet)) and have the cursor go to the area in the same sheet that references the band, and in the case of the "Back to Log" go to the Station Log sheet. I have searched the forum, and found a couple of references, but still do not understand (step by step) the instructions on how to make a hyperlink. Please see attached
  • 0

You do not have the required permissions to view the files attached to this post.
lawitcher1
Regular
 
Posts: 72
Joined: Jan 29, 2012
Reputation: 0

Re: Hyperlink from one cell to another in 2010

Postby NoSparks » Wed Nov 25, 2015 12:00 am

Larry, I had posted a reply here and then removed it. It makes no sense to me to do what's already been done.
You need to figure out where you're going with this or you'll be trying to re-invent the wheel over and over again.

Obviously this Excel program is to your liking or you would have abandoned it.

I've gone to the Kelly Klaas page and downloaded the .xls file so I can see the macros.
File was created in 2001 and was last updated in 2008, says do anything you want with it.

I loaded it into Excel 2010, filled in your stuff on the first sheet, copied your posted Band Plan info to the .xls Band Plan sheet, put the Worksheet_Change code onto the Station Log sheet, made a couple of alterations in the code where the file name was hard coded then saved as "ham log II 2010.xlsm"

See if this is something you can work with, it needs some tuning in the filter and print stuff but will cross that bridge when you get to it.

edit: Dec 2 edited file
  • 0

You do not have the required permissions to view the files attached to this post.
Last edited by NoSparks on Wed Dec 02, 2015 2:32 pm, edited 2 times in total.
NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Re: Hyperlink from one cell to another in 2010

Postby NoSparks » Fri Nov 27, 2015 1:14 am

I'm posting it here as it pertains to the file I posted in this thread and is a VBA macro issue.
This is in response to your thread at viewtopic.php?f=2&t=7261

I discovered that after entering a few Call Signs to see if things worked properly, and deleting them I had to copy a unused cell and paste it where I had deleted the cells in order to work again.

This is bothering me, I can't comprehend this at all.
What is happening or not happening the way you expect it to? or want it to?

Be aware the macro is (currently) only fired by a single cell changing value. Deleting or copying to more than one cell at a time will not fire the macro.
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Re: Hyperlink from one cell to another in 2010

Postby NoSparks » Thu Dec 03, 2015 12:24 am

A cell change can be used to initiate a macro to do almost anything.
The contents of a cell being deleted is a change.
It's ridiculous to copy and paste a blank cell into a blank cell, something else is in play here.

Please tell me what you do that causes you to say it doesn't work properly.

What would like to happen when a duplicate is deleted?
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Re: Hyperlink from one cell to another in 2010

Postby lawitcher1 » Thu Dec 03, 2015 5:42 pm

When I delete the cells that are duplicated, the information ithe sheet still acts as if the information is still there.
  • 0

lawitcher1
Regular
 
Posts: 72
Joined: Jan 29, 2012
Reputation: 0

Re: Hyperlink from one cell to another in 2010

Postby NoSparks » Thu Dec 03, 2015 10:00 pm

As the worksheet change event can only pertain to one cell you'll need to delete the column A cells one at a time with the delete key. I've added a little highlighting to the duplicate. Test this out and let me know if it's more to your liking.

Delete the entire Station Log module Worksheet_Change code and replace it with this.
Just click on SELECT ALL then copy and paste.

Code: Select all

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rng As Range
   
'limit checking to col A below row 6
If Target.Column <> 1 Or Target.Row < 7 Or Target.Count <> 1 Then Exit Sub

'establish range to check for duplicate
Set rng = Range("A7:A" & Cells(Rows.Count, 1).End(xlUp).Row)

'prevent this event from calling itself
Application.EnableEvents = False

'if target is not empty
If Target.Value <> "" Then
'count how many times target appears in rng
    If Application.WorksheetFunction.CountIf(rng, Target.Value) = 1 Then
        'it's targets first occurrance, put date/time into adjacent cell
        Target.Offset(0, 1).Value = Now
        'remove any existing cell fill color
        Target.Interior.ColorIndex = 0
    Else
        'it's a duplicate
        'put date/time in adjacent cell
        Target.Offset(0, 1).Value = Now
        'indicate it's a duplicate
        Range("A3").Value = Target.Value
        'color the just entered duplicates cell
        Target.Interior.ColorIndex = 36
    End If
'if target is empty ie:been deleted
Else
    'remove date/time
    Target.Offset(0, 1).Value = ""
    'clear duplicate indication
    Range("A3").Value = ""
    'remove cell color
    Target.Interior.ColorIndex = 0
End If

'make sure events are re-enabled
Application.EnableEvents = True

End Sub
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Re: Hyperlink from one cell to another in 2010

Postby lawitcher1 » Fri Dec 04, 2015 4:38 am

Now, THAT is nice. What a treat to have the changes you made. The code works Perfectly. I have learned so much in the last few sessions. THANK YOU! :D :D :D :D
  • 0

lawitcher1
Regular
 
Posts: 72
Joined: Jan 29, 2012
Reputation: 0

Re: Hyperlink from one cell to another in 2010

Postby NoSparks » Fri Dec 04, 2015 9:27 am

That's great, glad I could help.

How you making out with the UTC time thing?
If you need assistance with this you should probably post it as a separate topic.
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010


Return to Macros and VBA Questions

Who is online

Users browsing this forum: Google [Bot] and 242 guests