Macro Short Shortcut?

ChrisHockley

New Member
Joined
Feb 6, 2017
Messages
23
All,

I have a VERY large document that I have to calculate margins in. With so many lines I created a Macro to assist (ctrl+w) by doing a goal seek function. I need one specific margin to make the product viable. This works much better but it's annoying that you can't just drag down. instead I get a hand cramp as I hit down arrow and ctrl+w a 1000 times each.

Is there any way to assign a key to this so say F1 (or other) = ctrl+w

down then one button would be so much easier.

thanks for any help!

chris
 
Last edited:

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

ChrisHockley

New Member
Joined
Feb 6, 2017
Messages
23
Is this what you are looking for?

Sub Macro2()
'
' Macro2 Macro
'
' Keyboard Shortcut: Ctrl+w
'
ActiveCell.Select
Application.CutCopyMode = False
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.GoalSeek Goal:=0.47, ChangingCell:=ActiveCell.Offset(0, 2).Range( _
"A1")
End Sub
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,722
Office Version
2013
Platform
Windows
Are you want to enter some value in 1000 cells in column A

Not sure what Goal Seek is
 

ChrisHockley

New Member
Joined
Feb 6, 2017
Messages
23
macro is fine.... cutting and pasting it requires hitting ctrl+w... just thought there has to be a way to paste it with one button instead of two is all.
 

Forum statistics

Threads
1,089,376
Messages
5,407,897
Members
403,169
Latest member
Luna17

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top