Forum Discussion

DezExcelQuestions's avatar
DezExcelQuestions
Copper Contributor
Dec 22, 2021
Solved

macro for cutting and pasting values

Hello! I am very new to VBA and Macros in general, so any feedback is greatly appreciated! I am essentially trying to make a title page for my workbook. I would like there to be a button labeled  "s...
  • mtarler's avatar
    Dec 22, 2021

    First off I seriously doubt you can't do this using simple cell formula(s). If needed you could fill ranges or individual cells and don't use ranges to start with (i.e. no spill possible). Do you realize that you are starting with 5 cells and pasting into 4 cells (maybe that is why you have spill error?).
    As for easier VBA code:
    ThisWorkbook.Sheets("copyFromSheet").Range("F2:J2").copy ThisWorkbook.Sheets("Paste data1").range("A13:D13")

    note the above is all 1 line with a single space (i.e. RANGE.copy DESTINATION )

Resources