0

I have columns "Current week" (col H) and "Previous week" (col G) both Headers being dinamic for each week (next week will be "Current Week" col I and "Previous week" - col H). The thing is I need to copy the data from Current week to Previous week (column from left) each time I want run the report in order to have the hystoric data.

I found some codes but they are not working to copy data on the previous column.

Can somebody help ?

4
  • I think this answer contains what you're looking for. You want to copy the range with .Copy, then paste the values in the other column with .PasteSpecial xlPasteValues. Commented Feb 26, 2020 at 17:03
  • Yes but you need to take in cosnideration the location of Current week and Previous week is dinamicly. I order to simply I named the range for Current week as H1Range (Ex: H3:H16) and I need to copy the data to previous column which is G3:G16. I need something like stackoverflow.com/questions/52702798/… but with previous column Commented Feb 27, 2020 at 13:31
  • I was merely stating that you need to copy values, not references. How you reference them is up to you. What I often do is record a macro of what I want to do, and that will give me the code for it if I am unsure. Commented Feb 27, 2020 at 15:50
  • As I setuped the Current as named range I made it with this Range("H1Range").Offset(, -1).Copy. Thx for the help anyway, kindly appreciate it ! Commented Feb 29, 2020 at 15:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.