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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Write Excel formula ad...
Power Automate
Answered

Write Excel formula adds unwanted @ symbol

(0) ShareShare
ReportReport
Posted on by 35

Hi, 

I'm trying to add this following formula to a particular cell in Excel:
=IFERROR(INDEX(B:B,MATCH(1,(B:B="%CurrentItem[1]%")*(G:G="SOME RANDOM TEXT"),0)),"FALSE")

The bot actually wrote formula as:
=IFERROR(INDEX(B:B,MATCH(1,(@B:B="%CurrentItem[1]%")*(@G:G="SOME RANDOM TEXT"),0)),"FALSE")

This changes the outcome of the formula, making it always return FALSE.
How can I fix this?

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Are you using 'Write to Excel Worsheet'?
    Instead, try using 'Send keys':

    1. 'Focus windows', window class = XLMAIN (you have to focus your workbook first in order to send keys)

    Inside your loop (since you're using CurrentItem):

    2. 'Select cells in Excel worksheet' to define where you'll write the formula

    3. 'Send keys' {F2}

    4. 'Send keys' =IFERROR(INDEX(B:B,MATCH(1,(B:B="%CurrentItem[1]%")*(G:G="SOME RANDOM TEXT"),0)),"FALSE") {Return}

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    @Anonymous is a great solution.  Another would be to write your formulas to a variable, and then put the variable in the Write to Excel command, so there are no expression parameters messing with your text.

  • drkeek Profile Picture
    35 on at

    thank you @Anonymous ! Your solution works a treat!

    @MichaelAnnis I tried putting mine in variable but unfortunately didn't work for this one. I've no doubt it will work in some cases though. 

    I have a 3rd solution, though less elegant:
    1. Have the formula in place as a template on top row (row 2 in this case as row 1 is header)

    =IFERROR(INDEX(B:B,MATCH(1,(B:B=M2)*(G:G=N2),0)),"FALSE")

    2. The formula now references the values in M2 and G2 instead

    3. Copy paste values into relevant rows in column M and G

    4. Copy paste formula from row 2 to relevant row

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 223 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard