Jump to content

Help Excel function


Recommended Posts

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 working

Found Example:

$oExcel.ActiveSheet.Cells(1,1).PasteSpecial(0xFFFFEFBD);Paste the copied content from the first Workbook into the second Workbook

What is the code for $oExcel.PasteSpecial(?????)?

Edited by MaoMao
Link to comment
Share on other sites

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

_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

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

$oExcel.Sheets("ExcelBook1").Select

$oExcel.Activesheet.Columns(3).copy

$oExcel.Activesheet.Columns(4).Select

$oExcel.Activesheet.PasteSpecial(Foumulars) ; ???? (Foumulars) not working

Try:

$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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...