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 / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Macro to Paste Value and Link to Another Cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cardan - 28 May 2008 23:40 GMT
Hello,

I am trying to write what I thought would be a simple macro but I am
having some difficulty in implementing it.

In essensence I have 3 cells.

A1 is a formula
A2 Needs to convert the value from A1 into its Value (Paste Special -
Value) function
A3 Needs to equal A2 after A2 has been converted to a value.

When I record this macro, I cannot seem to get A2 to stay at the
pasted value and I get lengthy iterations.(I am using the macro to
break a circular reference but still keep some fluidness)

Below is the macro I am having difficulties with. At this point, I
would like this to run only once per execution, however I may add a
loop later on.  Any suggestions would be greatly appreciated. Thank
you for your time.

Sub N2T()
   Range("B81").Select
   ActiveCell.FormulaR1C1 = "=R[-1]C"
   Range("B81").Select
   Selection.Copy
   Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
       :=False, Transpose:=False
   Application.CutCopyMode = False
   Range("B85").Select
   ActiveCell.FormulaR1C1 = "=R[-4]C"
   Range("B82").Select
End Sub
Geoff - 29 May 2008 04:10 GMT
Sub N2T()
   Range("B81").Value = Range("B80").Value
   Range("B85").FormulaR1C1 = "=R[-4]C"
   Range("B82").Select
End Sub

Signature

There are 10 types of people in the world - those who understand binary and
those who don't.

> Hello,
>
[quoted text clipped - 30 lines]
>     Range("B82").Select
> End Sub
cardan - 29 May 2008 23:44 GMT
> Sub N2T()
>     Range("B81").Value = Range("B80").Value
[quoted text clipped - 42 lines]
>
> - Show quoted text -

I just put it in my model. Works like a charm!  Thank you!!
 
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.