Excel changes a formula created in Google sheets

yashgt

New Member
Joined
Jul 9, 2018
Messages
10
Office Version
  1. 2013
Platform
  1. Windows
I have created a Table in google sheets with a formula:
Excel Formula:
=IF($D4=0, $E4 & "-" & INDEX( $D4:$H$5005, IFNA(MATCH(0,$D5:$D$5005,0),MATCH(TRUE,$D5:$D$5005="",0)), 2),"").

When I download the sheet as a .xlsx file, the formula changes to:
Excel Formula:
=IF($D4=0, $E4 & "-" &@ INDEX( $D4:$H$5005,@ IFNA(MATCH(0,$D5:$D$5005,0),MATCH(TRUE,@$D5:$D$5005="",0)), 2),"").

Excel is not able to recognize the @ symbol and shows a #NAME error for the cell.
How to prevent the change in formula?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Firstly does that even work in Google sheets, typically for an index match formula your initial range and match ranges have to line up, your formulas have the initial range from 4 : 5005 but the match from 5 : 5005.

Secondly is it a real table, as in a Table Object ?
A likely issue is that you are using a Dynamic array formula in Google sheets and you would need Excel 2021 or MS 365 for that to automatically convert to Excel.
 
Upvote 0
Does it help if you use:

=ARRAYFORMULA(IF($D4=0, $E4 & "-" & INDEX( $D4:$H$5005, IFNA(MATCH(0,$D5:$D$5005,0),MATCH(TRUE,$D5:$D$5005="",0)), 2),""))

in Google Sheets? (though as Alex said, your ranges are mismatched so you'll never get a match returning E5005.
 
Upvote 0
Firstly does that even work in Google sheets, typically for an index match formula your initial range and match ranges have to line up, your formulas have the initial range from 4 : 5005 but the match from 5 : 5005.

Secondly is it a real table, as in a Table Object ?
A likely issue is that you are using a Dynamic array formula in Google sheets and you would need Excel 2021 or MS 365 for that to automatically convert to Excel.
The formula works fine in Google sheets. The mismatch is deliberate.
In excel, if I remove the @ it works too. But I would like to make sure I don't have to remove the @ every time I download the gsheet.
 
Upvote 0
I think it is behaving differently in MS365 than it is for you in O2013.
In MS365 when I download either as is or using Rory's ArrayFormula, I get the Google sheets formula surrounded by parenthesis { } indicating its an array formula and it shows up as @Name?.
If I copy in your resulting formula with the @ in it then running the below in the immediate window fixes it for me but I am not sure it will work in your version but you can give it a try.
VBA Code:
ActiveSheet.UsedRange.Formula2 = Application.Substitute(ActiveSheet.UsedRange.Formula2, "@", "")

If it doesn't work try this one in the immediate window:
Excel Formula:
ActiveSheet.UsedRange.FormulaArray = Application.Substitute(ActiveSheet.UsedRange.Formula, "@", "")
 
Upvote 1

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top