Hi @quadcom ,
Can you try these with Vbscript.Please paste the below Vbscript in Run VBScript action.
VBscript :
Dim xlApp, xlInputWorkbook, xlOutputWorkbook, xlInputSheet, xlOutputSheet
Dim lastRowInput, lastRowOutput, i, j
Dim inputKeyA, inputValueB, outputKeyC
' Create Excel application
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = False ' Set to True if you want to see the Excel windows
' Open the input and output workbooks
Set xlInputWorkbook = xlApp.Workbooks.Open("C:\Path\To\InputExcel.xlsx") ' Replace with your input file path
Set xlOutputWorkbook = xlApp.Workbooks.Open("C:\Path\To\OutputExcel.xlsx") ' Replace with your output file path
' Assuming data is on the first sheet of both workbooks
Set xlInputSheet = xlInputWorkbook.Sheets(1)
Set xlOutputSheet = xlOutputWorkbook.Sheets(1)
' Find the last row with data in the input and output sheets
lastRowInput = xlInputSheet.Cells(xlInputSheet.Rows.Count, "A").End(-4162).Row ' -4162 is xlUp
lastRowOutput = xlOutputSheet.Cells(xlOutputSheet.Rows.Count, "C").End(-4162).Row
' Loop through the rows of the input sheet
For i = 2 To lastRowInput ' Start from 2 to skip header
inputKeyA = xlInputSheet.Cells(i, 1).Value ' Column A
inputValueB = xlInputSheet.Cells(i, 2).Value ' Column B
' Loop through the rows of the output sheet
For j = 2 To lastRowOutput ' Start from 2 to skip header
outputKeyC = xlOutputSheet.Cells(j, 3).Value ' Column C
' Check if columns match
If inputKeyA = outputKeyC Then
' Place the value from input column B into output column B
xlOutputSheet.Cells(j, 2).Value = inputValueB
Exit For
End If
Next
Next
' Save and close the workbooks
xlOutputWorkbook.Save
xlInputWorkbook.Close False
xlOutputWorkbook.Close
' Quit Excel application
xlApp.Quit
' Clean up
Set xlInputSheet = Nothing
Set xlOutputSheet = Nothing
Set xlInputWorkbook = Nothing
Set xlOutputWorkbook = Nothing
Set xlApp = Nothing
(Note:- if you got your solution you can mark as solution and gives kudos)
Thanks & Regards
Vishnu Reddy