cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bf1980
Level: Powered On

trying to update an excel spreadsheet based on cell contents

Hello,

I am trying to update a speadsheet in the following ways:

if a cell is empty,  delete the row

 

if that same cell contains certain words,  delete the row.  Below is what i have(I left off the Empty option, as I gave up on it a while ago,  but if you have suggestions, I would love to try it)

 

flow1.JPGFLow2.JPG

4 REPLIES 4
Community Support Team
Community Support Team

Re: trying to update an excel spreadsheet based on cell contents

Hi @Bf1980,

 

Since you are judging the same Column, you could directly merge these Conditions into one condition.

It can also be judged whether this field is empty or not.

I speculate that these three conditions need to delete the corresponding row as long as they satisfy one, so you need to use the or() function.

You could consider replacing Delete a row action with Delete row action.

In addition, if you can, it is recommended to set Button or Recurrence as the trigger, because deleting the row operation is also changing the file, which will make Flow into a loop.

Expression reference:

@or(contains(items('Apply_to_each')?['PM_x0020_Description'], '"Emergency"'),contains(items('Apply_to_each')?['PM_x0020_Description'], 'Evaluation'),empty(items('Apply_to_each')?['PM_x0020_Description']))

Image reference:

13.PNG12.PNG

Please take a try.

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Bf1980
Level: Powered On

Re: trying to update an excel spreadsheet based on cell contents

Thank you!  I have tried your solution, it seems to want to work, but I get a 423 error everytime I run it.  I tried to do a save as and created a new file, just to see if that would work,  it did not!  do you have any ideas?

Bf1980
Level: Powered On

Re: trying to update an excel spreadsheet based on cell contents

So, I was able to get the flow to run,  But it is not deleting any of the rows.

 

I modified your code slightly:

@or(contains(items('Apply_to_each')?['PM_x0020_Description'], '"Emergency"'),contains(items('Apply_to_each')?['PM_x0020_Description'], '"Evaluation"'),empty(items('Apply_to_each')?['PM_x0020_Description']),contains(items('Apply_to_each')?['PM_x0020_Description'], '"Engineering"'),contains(items('Apply_to_each')?['PM_x0020_Description'], '"Inspection"'))

 

 

Capture.PNG

Bf1980
Level: Powered On

Re: trying to update an excel spreadsheet based on cell contents

attached you will see that the flow completes successfullyCapture.PNG

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,858)