open the spreadsheet file for each rowcheck whether the value in column is celerygarlicor lemon if it isupdate the price in column save the spreadsheet to new file (so that you don' lose the old spreadsheetjust in casestep set up data structure with the update information the prices that you need to update are as followscelery garlic lemon you could write code like thisif producename ='celery'cellobj if producename ='garlic'cellobj if producename ='lemon'cellobj having the produce and updated price data hardcoded like this is bit inelegant if you needed to update the spreadsheet again with different prices or different produceyou would have to change lot of the code every time you change codeyou risk introducing bugs more flexible solution is to store the corrected price information in dictionary and write your code to use this data structure in new file editor tabenter the following code#python updateproduce py corrects costs in produce sales spreadsheet import openpyxl wb openpyxl load_workbook('producesales xlsx'sheet wb['sheet'the produce types and their updated prices price_updates {'garlic' 'celery' 'lemon' todoloop through the rows and update the prices save this as updateproduce py if you need to update the spreadsheet againyou'll need to update only the price_updates dictionarynot any other code