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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

IF Logic when updating Excel with Variable

(0) ShareShare
ReportReport
Posted on by 7

I receive an email with various fields that I then use Power Automate to update an Excel File. One of the fields is a department. I've assigned this as a variable and then assigned that variable to upload the cell in Excel. My issue is that one of the departments comes across as just the first part of the name, but the Excel file I'm working with needs the full name filled out. I can do this easily with an IF statement in Excel but I'd like to make this fully operable in Power Automate. I've tried this formula but I'm getting an error: 

 


IF(Variables('VerticalFinal')='Admin',concat(variables('VerticalFinal'),'istration'),variables('VerticalFinal')

 

 

My logic is: if Vertical Final says Admin then concat it to make it say Adminstration, else place just the VerticalFinal variable name. 

I have the same question (0)
  • Verified answer
    efialttes Profile Picture
    14,756 on at
    Re: IF Logic when updating Excel with Variable
    Hi
    Replace
    IF(Variables('VerticalFinal')='Admin',concat(variables('VerticalFinal'),'istration'),variables('VerticalFinal')
    and use this instead
    if(equals(variables('VerticalFinal'),'Admin'),concat(variables('VerticalFinal'),'istration'),variables('VerticalFinal'))
    Hope this helps
  • nbarta Profile Picture
    7 on at
    Re: IF Logic when updating Excel with Variable

    Thanks! That did the trick. I didn't know about the <equals> function. 

  • efialttes Profile Picture
    14,756 on at
    Re: IF Logic when updating Excel with Variable
    Hi!
    Just in case it helps you in the future, here you are the currently supported functions
    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

    Happy flowing!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 797 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
developerAJ Profile Picture

developerAJ 319

Last 30 days Overall leaderboard