MaoMao Posted May 27, 2012 Share Posted May 27, 2012 (edited) Hello, Searched the site for $oExcel.Activesheet.PasteSpecial. Only able to found example of paste copied content.Need to copy formular of a new Excel column. Please help.$oExcel.Sheets("ExcelBook1").Select$oExcel.Activesheet.Columns(3).copy$oExcel.Activesheet.Columns(4).Select$oExcel.Activesheet.PasteSpecial(Foumulars) ; ???? (Foumulars) not workingFound Example:$oExcel.ActiveSheet.Cells(1,1).PasteSpecial(0xFFFFEFBD);Paste the copied content from the first Workbook into the second WorkbookWhat is the code for $oExcel.PasteSpecial(?????)? Edited May 27, 2012 by MaoMao Link to comment Share on other sites More sharing options...
saywell Posted May 27, 2012 Share Posted May 27, 2012 Would these, from the excel UDF, be what you're looking for?William_ExcelReadCell_ExcelWriteFormula Link to comment Share on other sites More sharing options...
MaoMao Posted May 27, 2012 Author Share Posted May 27, 2012 Thanks. May force to do it cell by cell use ExcelWriteFormula if PasteSpecial do not work.Trying to find easy way if there are code for PasteSpecial(Foumulars)$oExcel.Activesheet.PasteSpecial(?????) ; ????? (Foumulars) code not found.Anyone know if the $oExcel.Activesheet.PasteSpecial(Formulars) works or the code of PasteFormulars for PasteSpecial(?????)? Link to comment Share on other sites More sharing options...
saywell Posted May 27, 2012 Share Posted May 27, 2012 I haven't used it, but it looks like you can specify a range for _ExcelWriteFormula .William Link to comment Share on other sites More sharing options...
MaoMao Posted May 27, 2012 Author Share Posted May 27, 2012 _ExcelWriteFormula seems a powerful function. It could be a good way to try.The worksheet now working at got different formulars for each row and got data different for each column.Used to do it manually to copy high light the column and then drag the formular to the rest of the columns.(or pastespecial special the formula to the rest of columns.It seems there is no lazy way to do it. Just need more Autoit program. Link to comment Share on other sites More sharing options...
water Posted May 27, 2012 Share Posted May 27, 2012 Information about PasteSpecial can be found on MSDN.If I undertstand your original post you want to copy the formulas of column 3 to column 4? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki  Link to comment Share on other sites More sharing options...
Juvigy Posted May 30, 2012 Share Posted May 30, 2012 $oExcel.Range("A2").Copy $oExcel.Range("A3").Select $oExcel.Selection.PasteSpecial(-4123,-4142,False,False) Link to comment Share on other sites More sharing options...
lorenkinzel Posted May 30, 2012 Share Posted May 30, 2012 It seems there is no lazy way to do it.The Excel macro recorder serves my laziness really well.It does seem to work best if you record short, choppy macros rather than 1 multi-function macro.That makes it easier to translate the code to AutoIT. Link to comment Share on other sites More sharing options...
Reg2Post Posted May 30, 2012 Share Posted May 30, 2012 $oExcel.Sheets("ExcelBook1").Select$oExcel.Activesheet.Columns(3).copy$oExcel.Activesheet.Columns(4).Select$oExcel.Activesheet.PasteSpecial(Foumulars) ; ???? (Foumulars) not workingTry:$oExcel.ActiveSheet.Columns("C:C").Copy$oExcel.ActiveSheet.Columns("D:D").Select$oExcel.Selection.PasteSpecial(0xFFFFEFBD,Default,Default,Default) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now