You are here:

Excel/Running a macro in excel 2003 without using keystrokes



I am trying to run a macro from a formula in a cell on a work sheet.  For example.... =IF A29=1????  this is where I get stuck.. (=IF A29=1 then run the Macro to print the worksheet).

I would like to run the macro that I have recorded.  The Macro will print the worksheet.  the hot key for the Macro is Ctrl+q.... if I hit the hot key the macro works.

Thank you

John Lyons

Assuming you macro was someithing basic like this:

Sub PrintSheet()
    ActiveSheet.Printout Copies:=1
End Sub

You can add a test to the beginning to check cell A29.

Sub PrintSheet()
    If Range("A29") = 1 Then  ActiveSheet.Printout Copies:=1
End Sub

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Jerry Beaucaire


Excel Formulas, macros, automation. Microsoft Excel MVP - 2010. Code site with free code snippets and techniques:


Microsoft Excel MVP - 2010. I have my own extensive Excel help/code site: ===================== I have been offering free assistance as an Excel aid on many web sites for many years: ( - JBeaucaire) ======== ( - JBeaucaire) ======= ( - jbeaucaire)

Bachelor's Degree from Azusa Pacific University in Mathematics and Music Composition

Awards and Honors
Microsoft Excel MVP 2010

©2017 All rights reserved.

[an error occurred while processing this directive]