How to Enter formulas in Excel with a macro

Jul 13, 2010 09:27 AM
Article cover image

In order to enter formulas in Excels with a macro, you will need to open your spreadsheet. Formulas are used to do calculations. Go to the field, where you want to enter a formula. Type in the formula. Then, highlight the formula. Press Control + C to copy the formula. Next, delete the contents of the cell. Press Alt + F11. The shortcuts that you will be using are Alt + F11 for VBA window and Alt + F8 to view macros. Select the workbook, insert, and module. Enter this macro: Sub Enter_Formulas() range("D4").Formula = "[insert the formula that you copied earlier]" End Sub. Go back to your spreadsheet. Press F8. You can also extend the range beyond that cell, if you like.

Just updated your iPhone? You'll find updated Apple Intelligence capabilities, new wallpapers, and enhancements to Calculator, PDF cropping, and Live Voicemail, among other useful features. Find out what's new and changed on your iPhone with the iOS 18.3 update.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!