I need a VB Script to copy values from Excel1 - sheet1 - column 1 to Excel2 - sheet2 - column 2
Loading
I need a VB Script to copy values from Excel1 - sheet1 - column 1 to Excel2 - sheet2 - column 2
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Uday DodiyaPosted Jun 21, 2024, 11:24 AM
Hello Nidhi Kowalli,
To create a VBScript that copies values from
Excel1(Sheet1, Column 1) toExcel2(Sheet2, Column 2), you can follow the steps below. This script uses theExcel.Applicationobject to automate Excel operations.Here is a sample VBScript:
Explanation:
Excel1andExcel2.CreateObject("Excel.Application").Sheet1ofExcel1andSheet2ofExcel2.Sheet1.Sheet2.Excel2and close both workbooks.Make sure to replace
C:\Path\To\Excel1.xlsxandC:\Path\To\Excel2.xlsxwith the actual file paths of your Excel files. Save this script with a.vbsextension and run it. Ensure that Excel is installed on your system and the paths to the files are correct.