Help Creating A Macro

Kristi6178

New Member
Joined
Dec 31, 2015
Messages
6
First let me say, I know very little about macros. I have a few personal macros that I use which I found online over the years, but other than doing minor changes to them I have just copied them from other sources and assigned a shortcut to them to run. I don't know how to actually create one from scratch myself. So I really need help since the person I spoke with in my IT department said that a macro could do what I need, but she was unable to help since she doesn't have a lot of experience with them.

Here is basically what I am trying to do....I have a list of values in Column B, I would like to make it so that if you click a certain cell in column B it would move my cursor and enter a specific value into F2. e.g.
B3:B8=
[TABLE="width: 309"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
</tbody>[/TABLE]
10ft x 5ft - $1,255
10ft x 6.4ft - $1,325
12ft x 5ft - $1,325
12ft x 6.4ft - $1,395
14ft x 5 ft - $1,425
14ft x 6.4ft - $1,495

If I click on B3, I want it to enter $1,255 into F2. If I click on B4, I want it to enter $1,325 into F2. etc. I have over 50 values in column B to choose from. If someone can write a basic macro, I know enough to edit the macro and change the source cell and the value. Also, would I need a separate macro for each B value, or can they all be put into a single macro?

I initially thought I could create a hyperlink from B3 to send my cursor to F2 and then enter an assigned value automatically to the cell, but I've been told hyperlinks don't work that way. So I think a macro is my only option unless someone has other ideas.

As for other information you may need to do a macro....the filename is Trailers.xlsm, the sheet name is Trailer. I'm not sure if you need any other information from me. If anyone can help it would be greatly appreciated.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
How about
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
   If Not Intersect(Target, Range("B3:B50")) Is Nothing Then
      Range("F2").Value = Target.Offset(, 1).Value
      Cancel = True
   End If
End Sub
This needs to go in the relevant sheet module & works when you double click in rangeB3:B50
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top