![]() |
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 |
All times are GMT +1. The time now is 11:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com