What do I need to change, to make a Macro work, as a Script, for Power Automate?

Pádraig Ó Tomhnair 0 Reputation points
2024-05-08T19:02:57.33+00:00

Hi,

I have this Macro, that checks a Cell, on a particular Sheet, and sends an E.-Mail, if the Cell is a value, or less.

Well, with the Macro no longer working, to still do what I'm going to want to do, with Power Automate, I assume that I'll have to use a Script.

I'm wondering what will I have to change, to make the Script, and Power Automate, do what the Macro did.

Can anyone help me? I can share the Macro that was working, to help.

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,542 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,584 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Andrew Geddes 741 Reputation points
    2024-05-08T20:00:18.36+00:00

    Hey there,

    Power Automate is a bit easier than that, here's a template that could be leveraged.

    User's image

    However it would be much better to use a Microsoft List solution in this case and then leverage power automate. The reason is because of the Trigger.

    With SharePoint, you can set the trigger to automated based off create/update event in the list, then have it perform the check and send the email. You wouldn't need the variables or the table above, just a condition check on the data entered. Could look something like this, so you get a sense of how much simpler it could be.

    You can even create the list and ingest the data via SharePoint :)
    User's image

    0 comments No comments

  2. Elizabeth Samuel MSFT 11 Reputation points Microsoft Employee
    2024-05-09T19:15:28.3766667+00:00

    Office Scripts + Power Automate may be an option for you.

    This tutorial may be a good start for you: Send weekly email reminders based on spreadsheet data

    There are a number of examples available: https://learn.microsoft.com/en-us/office/dev/scripts/resources/samples/samples-overview

    More info about running Office Scripts with Power Automate: https://learn.microsoft.com/en-us/office/dev/scripts/develop/power-automate-integration?tabs=run-script

    0 comments No comments

  3. Pádraig Ó Tomhnair 0 Reputation points
    2024-05-15T07:28:08.32+00:00

    I decided to go a different way. I formatted the Cell that I wanted checked, as a Table. and then set this up.

    User's image

    The Filter Query is Inventory eq 'lessOREquals(40,40)'

    It worked.

    0 comments No comments