Not logged inThe Guild of Free Traders - Discussion Forum
Forum The Guild of Free Traders Help Login
Up Topic Public Area / Off-Topic / Do we have any excel macro guru's?
- - By Fluffy Date 2015-01-26 18:49
Cuz if we do, I needs halp!

I have a series of macros that turns some raw data into a report that sorts, evaluates and displays data in a particular way.  I'm adding to the evaluation process a step that takes certain information and puts it into a different sheet.  Everything works as it should, and no errors are thrown (any more).  But I can't get it to copy and paste from the active sheet to the destination sheet.  I created a new function called UnConfirmed that takes 3 paramaters to accomplish what I'm wanting and changed my if statements to call the function if appropriate.  Below are the code invovled.  Any pointers in the right direction would be appreciated.

Snippet ofSubroutine A that calls
proof = True

ByPotential:
diff = DateDiff("d", Cells(y, 9), Sheets("Diverter").Cells(25, 2))
If diff >= 0 Then
    Cells(y, 13) = Cells(y, 11)
ElseIf proof = True Then
    Cells(y, 12) = Cells(y, 11)
    z = y
    UnConfirmed nfmRow, z, "Sheet11"
    nfmRow = nfmRow + 1
End If
       
    y = y + 1
   
    GoTo Checkcase

Function B that is called

Function UnConfirmed(toRow As Integer, fromRow As Integer, toSheet As String)
' This function takes data from each sorted sheet and moves the nfm or potential to another sheet for review.
' added 1-26-15

Range(Cells(fromRow, 1), Cells(fromRow, 10)).Select
    Selection.Copy
   
    Sheets(toSheet).Select
    Cells(toRow, 1).Select
    ActiveSheet.Paste

End Function
Parent - By Roda Slane Date 2015-03-09 16:55
please clarify: are you are trying to copy the formulas to another sheet, or you are trying to copy the results to another sheet? In the first case, check that the cell addresses in the formulas are correct after the paste (including pointing to the correct file, if pasting to a new file) . In the second case, copy/paste will copy the formulas, not the resulting values. You may have to create a script that reads the results, and inserts those results (into yet another sheet) as raw values, that you can then manually copy/paste.
Up Topic Public Area / Off-Topic / Do we have any excel macro guru's?

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill

Net::CIDR::Lite module not available.