+ Reply to Thread
Results 1 to 2 of 2

Looping Calculated Data and Pasting to Another Location

  1. #1
    Registered User
    Join Date
    03-27-2008
    Posts
    75

    Looping Calculated Data and Pasting to Another Location

    Hi Guys- You can see from the code below that I am trying to paste a cell from one sheet (master gaming report) into another (Risk Tool) and then copy the results (some calculations are made) and pate them as trasnposed values into another sheet(output).

    This is working fine, what I can't do is make the this loop. I need it to copy each cell from column B in 'mater gaming report' and paste all of those caluculations into output (as trasnposed values), so that I have a whole bunch of rows with each values calculations (rows should equal the amount of values found in col. B of master gaming report). Any help would be much appreciated.

    Here is my code:

    Sub output()
    '
    ' output Macro
    '
    ' Keyboard Shortcut: Ctrl+q
    '
    Rows("2:1258").Select
    Selection.ClearContents
    Range("A2").Select
    Sheets("Risk Tool").Select
    Range("E19").Select
    Selection.ClearContents
    Sheets("Master Gaming Report").Select
    Range("B2").Select
    Selection.Copy
    Sheets("Risk Tool").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    ActiveWindow.ScrollColumn = 2
    ActiveWindow.ScrollColumn = 3
    ActiveWindow.ScrollColumn = 4
    ActiveWindow.ScrollColumn = 5
    ActiveWindow.ScrollColumn = 6
    ActiveWindow.ScrollColumn = 7
    ActiveWindow.ScrollColumn = 8
    Range("X2:X25").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Output").Select
    Range("A2").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=True
    Range("A3").Select
    End Sub

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello starbwoy,

    Please read the Forum Rules and wrap your code. Here is how to do it...
    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]
    If you don't do this, I will have to lock your post. You will have to send me a private message or post back saying you will abide by the Forum rules. Only then will your original post be unlocked.

    Click Here to Read the Rules


    Sincerely,
    Leith Ross
    Last edited by Leith Ross; 04-23-2008 at 12:46 PM.

+ 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