Document Editing Problems

Change JPG to PNG File Extensions in an Excel Column

Algirdas JasaitisAlgirdas Jasaitis Dec 2, 2026 868 views

Question details

Change .jpg extensions to .png in a column of file names while preserving the base names.

Change JPG to PNG File Extensions in an Excel Column
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains file names whose displayed extensions need to be updated in bulk.
Observed behavior
The desired result is a column of names ending in .png instead of .jpg, without changing the underlying image files.
Before you start

Identify the column containing the file names and check whether any base names also contain .jpg. Changing text in cells does not rename or convert the actual image files.

Solution 1Recommended

Use a formula to replace only the ending extension

Use this method when you need to preserve base names and leave entries without a .jpg suffix unchanged.

1
Enter the formula

In an empty column beside the first file name, enter =IF(RIGHT(A2,4)=".jpg",LEFT(A2,LEN(A2)-4)&".png",A2). Replace A2 with the first file-name cell.

2
Fill the formula down

Select the formula cell and drag its fill handle down alongside the remaining file names.

3
Keep the results as text

Check the results, then copy the new column and use Paste Special > Values if you want to replace formulas with text.

Use a formula to replace only the ending extension
Cell text only: The formula changes the names displayed in the worksheet; it does not rename or convert the image files.
WPS Spreadsheets

Update file-name extensions in WPS Spreadsheets

Use a formula in WPS Spreadsheets to change a .jpg suffix to .png while leaving the rest of each file name intact.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and select Open to load the workbook containing your file names.
  2. 2. Enter the formula: In an empty cell beside the first name, enter =IF(RIGHT(A2,4)=".jpg",LEFT(A2,LEN(A2)-4)&".png",A2), adjusting A2 to match your sheet.
  3. 3. Fill the column: Drag the formula cell's fill handle down to apply it to the other file names.
  4. 4. Save the results: Check the results, then use File > Save As to save the workbook in your preferred spreadsheet format.
Changes only the ending .jpg text in each matching cellOpens and saves Microsoft Excel XLSX and XLS filesFills the same formula down a column for bulk editing
microsoft office alternative - wps office

Frequently Asked Questions

Does changing the extension in Excel convert the image to PNG?

No. Editing a cell changes only the worksheet text. Use an image editor or conversion tool to create actual PNG files.

How can I avoid changing .jpg inside a base name?

Use the RIGHT and LEFT formula in an adjacent column. It checks the final four characters and replaces only a .jpg suffix.

Can I use Flash Fill to update the names?

Enter corrected examples in an adjacent column, select the cells below them, and use Data > Flash Fill or Ctrl+E in Excel for Windows. Check the results because Flash Fill infers a pattern from your examples.

What happens to names that do not end in .jpg?

The formula returns those names unchanged. Find and Replace, however, can alter any .jpg text within the selected cells.