+ Reply to Thread
Results 1 to 6 of 6

copy and paste values rolling columns macro

  1. #1
    Registered User
    Join Date
    02-26-2016
    Location
    Milan
    MS-Off Ver
    2013
    Posts
    5

    copy and paste values rolling columns macro

    Hi guys!

    I have problem with a Macro.

    Here what I want to do.

    There are two sheets: Sheet 1 and Sheet2. Sheet2 will be updating everyday automatically. So, what I am interested in is creating a Macro which allows me to copy two cells (always the same N7:N8) from Sheet2 in Sheet 1 in a rolling logic. So, ideally, the first time it will run, the macro will copy those value in N7:N8 (sheet 2) and paste them in A7:A8 (sheet 1); the second time it will paste them in B7:B8, the third time in C7:C8 and so on. I need something which detect the "not empty cell" and paste the value in the cell belonging to the column right after the "not empty cell".

    Help it would be super !
    thanks!

  2. #2
    Registered User
    Join Date
    08-05-2015
    Location
    Finland
    MS-Off Ver
    Home and Business 2013
    Posts
    50

    Re: copy and paste values rolling columns macro

    Hey, try this one
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: copy and paste values rolling columns macro

    Welcome to the board!

    something like...
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  4. #4
    Registered User
    Join Date
    02-26-2016
    Location
    Milan
    MS-Off Ver
    2013
    Posts
    5

    Re: copy and paste values rolling columns macro

    Thanks guys!!! You two saved my day !

  5. #5
    Registered User
    Join Date
    02-26-2016
    Location
    Milan
    MS-Off Ver
    2013
    Posts
    5

    Re: copy and paste values rolling columns macro

    Thank you very much!

    Actually I have another problem:

    I was wondering how i can write a formula in VBA for calculating the variation in %(e.g. expressed (N7-M7)/M7 ) of the last two values just pasted.

    Ideally this formula will calculate the following
    The first time, the formula will calculate (N7-M7)/M7, being N7 the last column "not empty". The secon time the formula will calculate (O7-N7)/N7, being O7 the last column "not empty". And so on.

    I know you already saved my day, I was wondering if you could save my weekend
    thanks again,
    Dan

  6. #6
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: copy and paste values rolling columns macro

    Sorry for the delay.

    Maybe...
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to Copy from 2 Columns, Paste Value in the next 2 Columns, Then clear 1st Columns
    By MHALTTUNEN in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2014, 03:34 PM
  2. macro to add columns after existing columns and copy/paste headers and formulas
    By rhybeka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2013, 02:35 PM
  3. [SOLVED] Copy/Paste multiple columns as values based on another columns criteria
    By Dgp2012 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2013, 06:50 AM
  4. Macro to copy values from columns of one sheet & paste it to diffrnt Column Sequence
    By kmvasudha in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2013, 06:54 AM
  5. Macro to COPY and PASTE VALUES for in columns based on the date
    By tompee29 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 10:54 AM
  6. Macro to copy and paste values into new columns
    By rjerung in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2011, 05:39 AM
  7. 2 Macro's: only vertical copy/paste action and copy-paste 14 columns to the right.
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2010, 10:34 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1