Consulting

Results 1 to 2 of 2

Thread: Macros help

  1. #1

    Macros help

    I need help on this macro.

    [VBA]
    Range("D3").Select
    ActiveCell.FormulaR1C1 = "=R[9]C[8]"
    Range("D4").Select
    Calculate
    Selection.Copy
    Range("M12").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Range("D6").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("N12").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    [/VBA]
    This is actually setting cell D3 equal to L12 ( R[9]C[8]) and calculate then copy results in D4 to M12 and D6 to N12. However, I need to do this repeatedly from L12 to L2681 and copy each results in D4 to all the way to M2681 and D6 all the way to N2681.

    Please help

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Are you menat to updating D3, then D4 etc.? If so, won't you overwrite D4 which you are writing to M12?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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