Macro to

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:45 PM GMT


I am trying to record a macro that will: -Select a cell reference that has an worksheet address written in it "Sheet!A1". -This address is the destination address of a cell in another sheet where I would like a value to be place (1) -This address will change daily based on the date. -Ultimately, I need the macro to paste the value 1 to the address cell identified above without deleting past references.



Assume Sheet3!B9 contains the value to copy Assume Sheet5!F5 contains the address of the cell where the value in Sheet3!B9 needs to be copied to:

Sub ABC() Dim s As String s = Worksheets("Sheet5").Range("F5").Value Worksheets("Sheet3").Range("B9").Copy Application.Range(s) End Sub

I assume the value in Sheet5!F9 changes daily so as long as it doesn't duplicate a previously written value, then the code won't copy over a previous value.

That is how I understand your question.


©2024 eLuminary LLC. All rights reserved.