Novice VBA user here.

I recorded a macro to copy a specific cell from a worksheet to a cell on another worksheet in another workbook, as values only. I edited it so that it works for any source worksheet. It does seem to work OK but I'd appreciate suggested improvements please. I also want to extend it to copy B28 and B29 to AP2 and APQ respectively and I'm sure there's a neater way of doing it than repeating my code for the other two copy operations.

Sub CopyAsText_Edited()
'
' CopyAsText Macro
'
    With ActiveSheet
        Range("B27").Select
    Selection.Copy
    End With
    
    Windows("Walk Index.xlsm").Activate
    Sheets("TEMP").Select
    Range("AO2").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
End Sub
CopyFormulaAsText-1.jpg



Terry, East Grinstead, UK