Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default hyperlink - cell population

I'd put two little buttons from the Forms toolbar in adjacent cells and click on
them.

Assign each this macro:

Option Explicit
Sub testme01()

Dim myBtn As Button
Dim myCell As Range
With ActiveSheet
Set myCell = .Range("b1")
Set myBtn = .Buttons(Application.Caller)

If myBtn.TopLeftCell.Row = 1 Then
myCell.Value = myCell.Value & "C"
Else
myCell.Value = myCell.Value & "D"
End If
End With

End Sub


If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Stu wrote:

I have a spread sheet that has descriptions and a letter
or number next to them. Example:

A1 B1
cat C
dog D

I want to be able to click on cat and populate cell C1
with the letter C and I want to be able to click on dog
and populate cell C1 with the letter D consectivly, so if
I clicked on cat then dog cell C1 would contain "CD", if i
clicked on dog then cat cell C1 would contain "DC"....how
can I do this in excell with a link or is there a better
way to make it work?

thanks,

Stu


--

Dave Peterson

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
Hyperlink auto-population? Please Help LooseScrew354 Excel Worksheet Functions 1 October 8th 07 04:22 PM
cell auto population - why 0 when source cell is empty? David Smithz Excel Discussion (Misc queries) 4 June 18th 06 05:35 PM
Cell Population based on a Table JimS Excel Discussion (Misc queries) 2 April 4th 06 04:34 PM
Can I have automatic cell population while using combo list? rick Excel Discussion (Misc queries) 7 March 28th 06 05:28 AM
Automatic cell population MazzyMirsa Excel Discussion (Misc queries) 3 February 9th 06 06:15 PM


All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"