Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Macro to Paste Value and Link to Another Cell

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 371
Default Macro to Paste Value and Link to Another Cell


Sub N2T()
Range("B81").Value = Range("B80").Value
Range("B85").FormulaR1C1 = "=R[-4]C"
Range("B82").Select
End Sub

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


"cardan" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Macro to Paste Value and Link to Another Cell

On May 28, 8:10*pm, Geoff wrote:
Sub N2T()
* * Range("B81").Value = Range("B80").Value
* * Range("B85").FormulaR1C1 = "=R[-4]C"
* * Range("B82").Select
End Sub

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



"cardan" wrote:
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- Hide quoted text -


- Show quoted text -


I just put it in my model. Works like a charm! Thank you!!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. tln Links and Linking in Excel 0 April 22nd 07 04:28 PM
To paste link or to =cell ref?? FTM New Users to Excel 4 November 9th 06 01:55 PM
Paste active link with a macro DaveyJones Excel Programming 1 July 24th 06 01:31 PM
Macro: Copy and Paste Boomberg Link excelman Excel Discussion (Misc queries) 3 August 17th 05 06:56 PM
Paste Link enters a 0 into the cell where I paste. How do I elemin UNR Excel Discussion (Misc queries) 4 March 28th 05 01:54 AM


All times are GMT +1. The time now is 04:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"