@bensat2
Try the below syntax using foreach loop:


Direct check without for each loop:

Full flow screenshot:

Full code:
Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Deenu\\Excel1.xlsx''' Visible: True ReadOnly: False Instance=> ExceloneInstance
Excel.ReadFromExcel.ReadAllCells Instance: ExceloneInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelOneData
Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Deenu\\Excel2.xlsx''' Visible: True ReadOnly: False Instance=> ExceltwoInstance
Excel.ReadFromExcel.ReadAllCells Instance: ExceltwoInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelTwoData
LOOP FOREACH CurrentItem IN ExcelOneData
SET fistcolumnname TO CurrentItem.ColumnNames[0]
IF (CurrentItem.ColumnNames[0] = 'Package Name' OR CurrentItem.ColumnNames[0] = 'Service/ Package Name') = $'''TRUE''' THEN
# Implement your logic
Display.ShowMessageDialog.ShowMessage Title: $'''info''' Message: $'''test info''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
END
END
IF (ExcelOneData.Columns[0] = 'Package Name' OR ExcelTwoData.Columns[0] = 'Service/ Package Name') = $'''TRUE''' THEN
END
How to copy and paste the above code into your Power automate desktop?

Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀. If you'd like to appreciate me, please write a LinkedIn recommendation 🙏