web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / If statement for not e...
Power Automate
Unanswered

If statement for not empty cell Excel

(0) ShareShare
ReportReport
Posted on by 22

Hi Community, 

 

Probably this problem is easy, but I can't figure out how to resolve it. Can you help me?

 

I have would like to optimize my flow as follows: 

  • if a specific cell (excel) is not empty, apply some actions;
  • otherwise, continue flow

Thank you in advance!

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,250 Super User 2025 Season 2 on at

    @yellow43 
    Please follow the below proposed solution for the same. In the if condition I've mentioned the specific cell to validate.

    Deenuji_0-1709307381641.png

    Code:
    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Users\\Documents\\Holidays.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData
    IF IsEmpty(ExcelData[5][0]) THEN
    Display.ShowMessageDialog.ShowMessage Title: $'''tet''' Message: $'''Apply some action''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
    ELSE
    Display.ShowMessageDialog.ShowMessage Title: $'''tet''' Message: $'''Continue other actions''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
    END

     

    -----------------------------------------------------------------------------------------------------------------------------

    If I've resolved your query, please consider accepting it as the solution and giving it a thumbs up to help others find answers faster.


  • yellow43 Profile Picture
    22 on at

    Thank You!

    But if you want to iteract every row in a specific column?

  • Deenuji_Loganathan_ Profile Picture
    6,250 Super User 2025 Season 2 on at

    @yellow43 

    Included for each to iterate all the rows:

    Deenuji_0-1709314700767.png

     

     

    Code:

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Users\\Documents\\Holidays.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData
    LOOP FOREACH CurrentItem IN ExcelData
    IF IsEmpty(CurrentItem[0]) THEN
    Display.ShowMessageDialog.ShowMessage Title: $'''tet''' Message: $'''Apply some action''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
    ELSE
    Display.ShowMessageDialog.ShowMessage Title: $'''tet''' Message: $'''Continue other actions''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
    END
    END

    --------------------------------------------------------------------------------------------------------------

    If I've resolved your query, please consider accepting it as the solution and giving it a thumbs up to help others find answers faster.

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard