Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to record macro...? 1

Status
Not open for further replies.

osx99

Technical User
Apr 9, 2003
250
GB
Not sure if this is possible but would appreciate a quicker way of implemented the attached.

I have quite a complex excel input sheet which with many fields containing formulas to make it interactive. The formulas will be overtyped with data. The input sheet will be lightly password protected so the user can't see the formulae

I wanted to add a reset button which will restore the sheet to it's original format if required. I can do this easily by recording a macro and going through all cells and pressing enter in the formula bar to cature what's in there. For example

Code:
    Range("B2").Select
    ActiveCell.FormulaR1C1 = "Select Function Template:"
    Range("B4").Select
    ActiveCell.FormulaR1C1 = "1.1 Analysis Details"
    Range("B5").Select
    ActiveCell.FormulaR1C1 = _
        "=INDEX(R3C38:R3500C126,MATCH(""AD001"",R3C39:R3500C39,0),MATCH(R2C3,R3C38:R3C126,0)+2)"
    Range("C5").Select

However, this is quite time consuming so wanted to know if anyone has any bright ideas how to automate this?

I only need to do it once and the resulting recorded code will be used as a reset button event

Many thanks,
Os
 



Hi,

Copy the sheet. Hide the sheet.

Use the hidden sheet as a 'template'

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top