+ Reply to Thread
Results 1 to 6 of 6

Copy, past, formulas, loop

  1. #1
    Registered User
    Join Date
    10-09-2014
    Location
    Romania
    MS-Off Ver
    2010
    Posts
    4

    Copy, past, formulas, loop

    Hi,

    I'm trying to make a macro for this file but i can figure it out to work.

    I want to copy the values from "Final"sheet (column B, C and D) to sheet 1 in cells (C,2);(C,3);(C,4) and the result (G3 to L3) i want to insert it back to sheet "Final"
    I need a loop to do this for a large range of rows (over 25000). I have attached a sample file.

    Best regards,

    test.xlsx

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Copy, past, formulas, loop

    this will be very slow
    please post an example

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Copy, past, formulas, loop

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-09-2014
    Location
    Romania
    MS-Off Ver
    2010
    Posts
    4

    Re: Copy, past, formulas, loop

    Why in the sheet1 the range in ("B200:E2700")?

    I only need to insert the data in C2 - C5 and colect it from G3 - L3

    Ex: How it is made manualy step by step

    1. Copy value from A2("Final" sheet) in to C2("heet1")
    2. Copy value from B2("Final" sheet) in to C3("heet1")
    3. Copy value from C3("Final" sheet) in to C4("heet1")
    4. Observ result in to cells G3-L3("sheet1")
    5. Copy each value from the cells above to cells E2 - J2("Final" sheet) in that order

    I've attach an example

    The red cells are the values and the blue cells are the result
    Red value have to be copy from Final to Sheet 1
    Blue result have to be copy from Sheet 1 to Final

    test1.xlsx
    Last edited by Aftermaind; 10-10-2014 at 03:32 AM.

  5. #5
    Registered User
    Join Date
    10-09-2014
    Location
    Romania
    MS-Off Ver
    2010
    Posts
    4

    Re: Copy, past, formulas, loop

    How can condition this macro to go only the the last cell field of the column?

    ActiveCell.Offset.Range("A1:C1").Select
    Selection.Copy
    Sheets("Input Worksheet").Select
    Range("C2").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    Range("G3:L3").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Final").Select
    ActiveCell.Offset.Range("D1:I1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    ActiveCell.Offset(0, -3).Range("A2").Select
    Last edited by Aftermaind; 10-13-2014 at 07:19 AM.

  6. #6
    Registered User
    Join Date
    10-09-2014
    Location
    Romania
    MS-Off Ver
    2010
    Posts
    4

    Re: Copy, past, formulas, loop

    [SOLVED] You can close the thread


    Sub Macro6()

    Do Until IsEmpty(ActiveCell) And IsEmpty(ActiveCell.Offset(1, 0))

    ActiveCell.Offset.Range("A1:C1").Select
    Selection.Copy
    Sheets("Input Worksheet").Select
    Range("C2").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    Range("G3:L3").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Final").Select
    ActiveCell.Offset.Range("D1:I1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    ActiveCell.Offset(0, -3).Range("A2").Select


    Loop


    End Sub

+ 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. Replies: 0
    Last Post: 07-24-2014, 09:11 AM
  2. Loop - change value, calculate formulas, copy to new sheet, rename
    By gmn734 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2013, 11:00 AM
  3. Loop copy and past cells to a different word document.
    By tonnerre2000 in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2012, 07:33 AM
  4. vba to loop through dropdown list and copy and past value
    By PShingadia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2012, 02:38 PM
  5. loop copy and past cells
    By gill389 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2010, 10:48 AM

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