• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Gettin Sum into clipboard

Dutch

New Member
Aye Excel Wiz's,


On daily basis I work with a lot of excel files, and use a lot of filtering to check various quick sums, comparing, copy/pasting, etc.. And I am curious if its possible to get the following into the clipboard so that I can quickly paste it into another worksheet..


http://postimage.org/image/2le3iv6kk/


Hopefully I explained myself well.. ps. Using Excel 2007 if possible..


Wish you well,


Dutch
 
Dutch, fairly achievable but might not be as useful as you would hope.


The code below will do what you want but needs to go in the Workbook code, open the VBA editor, double click on "ThisWorkbook" and paste it in there. Then go to tools, references and put a check in "Microsoft forms 2.0 object library"


The challenge with the code is you need to have it in each workbook you use.


Someone else may have a better method for reading the status bar value directly.


Jesse


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)


Dim i As New MSForms.DataObject

Dim j As Double


j = WorksheetFunction.Sum(Selection)


i.SetText j

i.PutInClipboard


End Sub
 
Hey Jesse,


Thank you so much for the help. I've got just few little in between q's..


I've followed what you wrote, and it worked once, but later on it just kept on giving 0.


When I highlight a row, is it already in clipboard and I can ctrl+v? Or I need to do something in between?


Can I paste only in same workbook? Or in any? How does it work?


Cheers
 
Back
Top