+ Reply to Thread
Results 1 to 4 of 4

Simple Copy and Paste Macro

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Tokyo
    MS-Off Ver
    Excel 2003
    Posts
    16

    Simple Copy and Paste Macro

    Hi All,

    I would GREATLY appreciate help with the following simple copy and paste macro.

    Cells BZ9-BZ5008 is a list of numbers 1-5000

    I would like to have a macro go down this list, copying and pasting these key numbers into cell J4. Excel will do its calculations based on the key code in J4, then I would like to have the result, in cell BJ6 copied and pasted as a value into the corresponding cell next to the key code, cells CA9-CA5008.

    I wrote a simple macro but it is taking 30 minutes a run! I'm sure there's a way to speed this up...

    Thank you VERY much in advance!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Simple Copy and Paste Macro

    Sub LoopyCalcs()
    Dim cell As Range
    
        Application.ScreenUpdating = False
        For Each cell In Range("BZ9:BZ5008")
            Range("J4").Value = cell.Value
            cell.Offset(, 1).Value = Range("BJ6").Value
        Next cell
        Application.ScreenUpdating = True
    
    End Sub
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Tokyo
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Simple Copy and Paste Macro

    Thank you very much for the quick reply!

    I'm going to give that a try right now...

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Simple Copy and Paste Macro

    If that takes care of your need, please select Thread Tools from menu above and set this topic to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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