Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2007

Tip: Looking for answers? Try searching our database.

VBA code to read formular from another cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fLiPMoD£ - 24 Apr 2007 23:56 GMT
Hello,

I am trying to do something and not sure if that is possible.

Say in Sheet1, CellA1, I have a comment '= IF(and(b1=c1, d1=e1), "Do This",
"Do That")

Question is how can I call  the formula part in a vba to be paste in a
specified cell.

So say I run the macro in Sheet2, the macro should pick the formula =
IF(and(b1=c1, d1=e1), "Do This", "Do That") and paste in say Cell F1, then I
will want to copy the formula down to the last row.

The reason is that I can change the formula for other fields

Many thanks
Carl.
Barb Reinhardt - 25 Apr 2007 00:12 GMT
If you want the formula for Sheet 1 Cell A1 to be in Sheet 1 cell F1 do this:

Sheets("Sheet1").Range("F1").FormulaR1C1 =
Sheets("Sheet1").Range("A1").FormulaR1C1

alternatively, you could use
SHeets("SHeet1").cells(1,6).formulaR1C1 =
Sheets("Sheet1").cells(1,1),formulaR1C1

> Hello,
>
[quoted text clipped - 14 lines]
> Many thanks
> Carl.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.