Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-18-2022, 07:50 PM
soroush.kalantari soroush.kalantari is offline How to write a macro for inserting a formula in an Excel cell such that its components be p Windows 10 How to write a macro for inserting a formula in an Excel cell such that its components be p Office 2016
Competent Performer
How to write a macro for inserting a formula in an Excel cell such that its components be p
 
Join Date: Jun 2021
Posts: 124
soroush.kalantari is on a distinguished road
Default

Quote:
Originally Posted by p45cal View Post
Code:
Sub insertformula()
cell01 = ActiveCell.Address(0, 0)
cell02 = ActiveCell.Offset(1, 0).Address(0, 0)
Range("c1").Formula = "=" & cell01 & "+" & cell02
End Sub
Thank you very much. Your reply solved the problem.
Reply With Quote
 

Tags
formula, parameters



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write a macro for inserting a formula in an Excel cell such that its components be p HOW TO write a macro for dynamic relative named ranges in Excel? soroush.kalantari Excel Programming 7 01-28-2022 09:35 PM
How to write a macro for inserting a formula in an Excel cell such that its components be p Macro to write bold and unformatted text in a single cell Snoorelax Word VBA 2 06-27-2018 06:24 PM
Macro to copy formula from one cell to another anwar Excel Programming 1 04-25-2014 08:27 PM
Is it possible to write down a number starting with zero in excel cell? Rahmat_uk20 Excel 3 06-08-2012 02:26 AM
How to write a macro for inserting a formula in an Excel cell such that its components be p How can I write the following (whole) formula in a single cell? Learner7 Excel 1 07-19-2010 10:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft