Skip to main content
← All guides

9 min read

Fix prices in bulk in a Google Shopping feed

By Quentin Delepierre, Salesforce Commerce Cloud consultant

A 5% increase on one brand, a Black Friday sale on a selection of products, prices written “12,99” with no currency: in a Google Shopping feed, it all goes through g:price, g:sale_price and g:sale_price_effective_date. Here is the format Google describes, the Excel formulas to change prices in bulk without breaking it, the checks before you send the feed back, and the method to go from XML to Excel and back to XML.

Got your own XML? Drop it in and see it as a table, free and with no account. For an Excel file you can edit and then rebuild into an XML that keeps its structure, a free account is all you need.

Transform a file

Simple Excel table, free with no account, for files up to 1 MB. File that rebuilds into XML: free account, 3 free credits, no credit card.

Download an example result (.xlsx)Example source XML

The price format Google expects

The price (g:price) is a number followed by the currency code, per ISO 4217: <g:price>15.00 USD</g:price>. In every Google example, the decimal separator is a period, a space separates the amount from the code, and the amount has no thousands separator (1250 AUD). At most two decimals: Google rounds extra digits (1.0234 becomes 1.02).

The amount and the currency must match the price shown on the product page and at checkout. In VAT countries the price includes VAT; in the United States and Canada it excludes tax.

Google's g:price page doesn't say in so many words which decimal separator to use. But the pages of neighbouring price attributes (minimum order value, free shipping threshold) require a period, and no example uses a comma: always write the period. Anything outside the described format has no guarantee of being read, and a product that doesn't meet the minimum requirements is disapproved:

  • 89.90 EUR: the expected format.
  • 89,90 EUR: decimal comma, not Google's format.
  • 89.90: the currency is missing.
  • €89.90: a symbol instead of the ISO 4217 code (EUR).
  • 1,250.00 EUR: thousands separator; write 1250.00 EUR.

g:sale_price and g:sale_price_effective_date

  • g:sale_price has the same format as g:price and must be lower than the price. g:price keeps the full price, g:sale_price holds the sale price, in the same currency.
  • Without g:sale_price_effective_date, the sale price applies right away, as long as the tag is in the feed.
  • g:sale_price_effective_date is an ISO 8601 range: a start date and an end date, separated by a slash, each with time and time zone, in the format YYYY-MM-DDThh:mm±hhmm or YYYY-MM-DDThh:mmZ. Google's own example: 2016-02-24T13:00-0800/2016-02-29T15:30-0800. At most 51 characters, start before end.
  • Without a time, the sale starts at midnight on the start date and ends at 11:59 PM on the end date; without a time zone, Google uses UTC. Write both.
  • A price reserved for the members of a loyalty program goes in neither g:price nor g:sale_price: Google asks for the loyalty_program attribute for that.
  • These rules come from the Google Merchant Center documentation (the Price, Sale price and Sale price effective date pages, consulted on 15/11/2026); Google may change them.

The method: from XML to Excel, then back to XML

Two things about the Excel file. Its columns are in Text format: a formula typed in a column of the table would show as typed, without calculating. The columns you add to the right don't have that format. If a formula stays displayed as text, switch the cell to General format (Home › Number Format), then confirm the cell again.

A calculation column left in the file has no tag in the original feed. With no header, or with a header that can't be a tag name (“new price”, with a space), the rebuild stops on the screen “Filled cells won't be in the XML”. With a one-word header (“calc”), it doesn't stop: the column is written as a <calc> tag in every product, a tag the original feed didn't have. In every case, delete the calculation column before saving.

  1. Export your XML feed (from Merchant Center or the file your CMS or PIM generates) and keep a copy: it's your way back.
  2. Drop it on ExcelifyXML: the free preview shows one row per product (<item>). Confirm with “Transform to CSV — 1 credit”, then choose the Excel file (.xlsx).
  3. Open it in Excel. The columns keep their Google names: g:id, g:brand, g:price… To calculate, work in an empty column to the right of the table.
  4. When the result is right, copy the calculation column and paste it as values (Paste Special › Values) over the g:price column, then delete the calculation column.
  5. Save, then drop the Excel file, alone, on the Rebuild page (free): the XML comes back with the feed's structure.
  6. Go through the checks below, then re-import the XML into Merchant Center.

Decimal points, commas and Excel's language

A feed price is text (“89.90 EUR”), not a number: Excel can't multiply it. You have to split it, calculate, then put it back together. The formulas in this guide are written for an English Excel with a decimal point. Three differences from Google matter:

  • An Excel in another language may use semicolons between arguments, a decimal comma (1,05) and translated function names. If yours does, the French version of this guide shows the same formulas in French Excel.
  • To read the amount from a text with a period, NUMBERVALUE(text,".") takes the period as the decimal separator whatever the language of the computer (Excel 2013 and later). VALUE reads according to the computer's settings.
  • To put it back together, TEXT(number,"0.00") writes the number with two decimals and a period. If your Excel is set to a decimal comma (many European regional settings), the format code is "0,00" and you wrap it: SUBSTITUTE(TEXT(number,"0,00"),",","."), so the result still has the period Google expects.
Split and rebuild a price (example: price in C2, amount in F2, currency in G2)
Amount (a number) : =NUMBERVALUE(LEFT(C2,FIND(" ",C2)-1),".")
Currency          : =RIGHT(C2,3)
Rebuilt price     : =TEXT(F2,"0.00")&" "&G2

Case 1: a 5% increase on one brand

An invented feed extract: three products, two of them from the Nike brand. The table ExcelifyXML builds from it has one row per <item>.

  • The formula reads the amount and the currency from the price, multiplies by 1.05 for the targeted brand, rounds to two decimals and puts “94.40 EUR” back together. The other products keep their price as is (the last argument of IF).
  • For a decrease, replace 1.05 with 0.95. To target a category rather than a brand, replace B2="Nike" with ISNUMBER(SEARCH("Running",E2)), if E2 holds the category (g:product_type, for example): SEARCH ignores case.
  • After pasting as values, check two or three rows, then delete column D.
The feed (extract)
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
  <channel>
    <title>Example shop</title>
    <link>https://www.example.com</link>
    <item>
      <g:id>SH-001</g:id>
      <g:brand>Nike</g:brand>
      <g:price>89.90 EUR</g:price>
    </item>
    <item>
      <g:id>SH-002</g:id>
      <g:brand>Nike</g:brand>
      <g:price>129.00 EUR</g:price>
    </item>
    <item>
      <g:id>SH-003</g:id>
      <g:brand>Adidas</g:brand>
      <g:price>74.50 EUR</g:price>
    </item>
  </channel>
</rss>
The table before the increase
g:id , g:brand , g:price
SH-001 , Nike , 89.90 EUR
SH-002 , Nike , 129.00 EUR
SH-003 , Adidas , 74.50 EUR
Formula for D2 (calculation column), filled down
=IF(B2="Nike",TEXT(ROUND(NUMBERVALUE(LEFT(C2,FIND(" ",C2)-1),".")*1.05,2),"0.00")&" "&RIGHT(C2,3),C2)
The table after the increase (D pasted as values over C, then D deleted)
g:id , g:brand , g:price
SH-001 , Nike , 94.40 EUR
SH-002 , Nike , 135.45 EUR
SH-003 , Adidas , 74.50 EUR

Case 2: a dated sale on a selection

Here the feed has no g:sale_price. Add two columns to the right of the table, named exactly like the tags: g:sale_price (D1) and g:sale_price_effective_date (E1). A column the feed didn't have, named like the tag, becomes a tag at the end of each product; an empty cell writes nothing. Black Friday: 20% off the Nike brand, from 27/11/2026 at 00:00 to 30/11/2026 at 23:59, Paris time in winter (+0100).

  • g:price doesn't change: it's the full price. SH-003, outside the selection, has neither g:sale_price nor g:sale_price_effective_date.
  • The offset depends on the date: +0100 in winter, +0200 in summer (Paris time). A sale spanning a clock change gives each date its own offset. For a sale in UTC, write Z instead (2026-11-27T00:00Z).
  • TEXT needs the format codes of Excel's language: yyyy-mm-dd in English (aaaa-mm-jj in French).
  • Once the sale is over, empty the two columns for the rows concerned (an empty cell removes the tag) and re-import.
Formula in D2 (g:sale_price)
=IF(B2="Nike",TEXT(ROUND(NUMBERVALUE(LEFT(C2,FIND(" ",C2)-1),".")*0.8,2),"0.00")&" "&RIGHT(C2,3),"")
Formula in E2 (g:sale_price_effective_date)
=IF(B2="Nike","2026-11-27T00:00+0100/2026-11-30T23:59+0100","")
If the dates are in cells (G1: start, H1: end), in E2
=IF(B2="Nike",TEXT($G$1,"yyyy-mm-dd")&"T00:00+0100/"&TEXT($H$1,"yyyy-mm-dd")&"T23:59+0100","")
The table after the two columns (pasted as values over themselves)
g:id , g:brand , g:price , g:sale_price , g:sale_price_effective_date
SH-001 , Nike , 89.90 EUR , 71.92 EUR , 2026-11-27T00:00+0100/2026-11-30T23:59+0100
SH-002 , Nike , 129.00 EUR , 103.20 EUR , 2026-11-27T00:00+0100/2026-11-30T23:59+0100
SH-003 , Adidas , 74.50 EUR , ,
Product SH-001 in the rebuilt XML
<item>
  <g:id>SH-001</g:id>
  <g:brand>Nike</g:brand>
  <g:price>89.90 EUR</g:price>
  <g:sale_price>71.92 EUR</g:sale_price>
  <g:sale_price_effective_date>2026-11-27T00:00+0100/2026-11-30T23:59+0100</g:sale_price_effective_date>
</item>

Case 3: fixing badly formatted prices

Same method: a calculation column in D, pasted as values over g:price, then D deleted. One formula per flaw; if a price has several, chain them, pasting the result in between.

  • More than two decimals (12.999 EUR): Google rounds, but it's better to decide yourself, with ROUND(amount,2) as in case 1.
  • When the whole column has the comma, the shortest way is a find-and-replace limited to the g:price cells: select them without row 1, replace “,” with “.”. Don't use “Replace All” on the whole sheet: it would touch the headers too.
  • A thousands separator (1,250.00 EUR) is handled the same way: remove it, then, if needed, replace the decimal comma.
Decimal comma: 12,99 EUR becomes 12.99 EUR
=SUBSTITUTE(C2,",",".")
Missing currency: 12.99 becomes 12.99 EUR
=IF(RIGHT(C2,3)="EUR",C2,C2&" EUR")
Symbol instead of the code, when every price ends with a space and €: 12,99 € becomes 12.99 EUR
=SUBSTITUTE(LEFT(C2,LEN(C2)-2),",",".")&" EUR"
Symbol in front, as in €12.99: becomes 12.99 EUR
=MID(C2,2,20)&" EUR"
Price typed as a number in the cell: 12.5 becomes 12.50 EUR
=TEXT(C2,"0.00")&" EUR"

Checking before you send the feed back

ExcelifyXML doesn't check the price format: it writes what the cells contain. Add check columns (temporary, like the calculation columns), filter them on “Fix” (Data › Filter), correct, then delete them before saving.

  • The “_” in the third argument of NUMBERVALUE (price and sale price checks) names a thousands separator that doesn't exist in the price. Without it, Excel uses the one of your language: a comma could pass for a thousands separator instead of being rejected.
  • The date comparison reads the first 16 characters of each date (YYYY-MM-DDThh:mm): it holds when both dates are followed by a five-character offset (+0100). For a UTC range, with Z, read it by eye.
  • Compare a few prices from the file with those on your product pages: Google wants the same amount and the same currency. A formula can't see that.
  • Try a feed cut down to a few products first, and keep the original feed. After the upload, look at the price issues Merchant Center reports.
Price format (C2): an amount with a period, a space, three letters
=IFERROR(IF(AND(LEN(C2)-FIND(" ",C2)=3,ISNUMBER(NUMBERVALUE(LEFT(C2,FIND(" ",C2)-1),".","_"))),"OK","Fix"),"Fix")
Sale price lower than the price, same currency (D2: g:sale_price)
=IFERROR(IF(D2="","",IF(AND(RIGHT(D2,3)=RIGHT(C2,3),NUMBERVALUE(LEFT(D2,FIND(" ",D2)-1),".","_")<NUMBERVALUE(LEFT(C2,FIND(" ",C2)-1),".","_")),"OK","Fix")),"Fix")
Date range: 51 characters at most, start before end (E2)
=IF(E2="","",IF(AND(LEN(E2)<=51,LEFT(E2,16)<MID(E2,23,16)),"OK","Fix"))

What the rebuild does with prices

  • The XML keeps the <rss> root, the <channel> header, the g: namespaces and the field order; added columns (g:sale_price, g:sale_price_effective_date) arrive at the end of each product.
  • An empty cell writes no tag: products without a sale have neither g:sale_price nor g:sale_price_effective_date.
  • Values are written as you saved them: “94.40 EUR” stays “94.40 EUR”. ExcelifyXML recalculates no price.

Prices to fix? Drop your feed to see the free preview, no account needed:

Transform a file