Find & Replace Values in Multiple Excel Files using Python (fast & easy)

preview_player
ะŸะพะบะฐะทะฐั‚ัŒ ะพะฟะธัะฐะฝะธะต

๐——๐—˜๐—ฆ๐—–๐—ฅ๐—œ๐—ฃ๐—ง๐—œ๐—ข๐—ก
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€
In this video, I will show you how you can use Python to find and replace multiple values in Excel. You'll see that it's straightforward, and the whole process only takes a few seconds! In particular, we'll be using the openpyxl library.

๐ŸŒ ๐—Ÿ๐—œ๐—ก๐—ž๐—ฆ:

๐—ง๐—ข๐—ข๐—Ÿ๐—ฆ ๐—”๐—ก๐—— ๐—ฅ๐—˜๐—ฆ๐—ข๐—จ๐—ฅ๐—–๐—˜๐—ฆ
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

๐—–๐—ข๐—ก๐—ก๐—˜๐—–๐—ง ๐—ช๐—œ๐—ง๐—› ๐— ๐—˜
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

โ˜• ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ?
ะ ะตะบะพะผะตะฝะดะฐั†ะธะธ ะฟะพ ั‚ะตะผะต
ะšะพะผะผะตะฝั‚ะฐั€ะธะธ
ะะฒั‚ะพั€

*I will be here in the comments section. Please provide your exact error message for any issues, and I will try to help.*

CodingIsFun
ะะฒั‚ะพั€

Excellent explanation and thanks for the tips.
I haven't write scripts for 7 years, but as I'm going to have a job that needs some automations I had to install python again...
Continue with these simple and very straightforward explanations ;)

goldenight
ะะฒั‚ะพั€

This is the Next Step; truly thank you. I will learn more of the for loop and the paths but clearly this would make much easier some tasks.

jorgesantanderm
ะะฒั‚ะพั€

Just wanted to let you know that i eagerly wait for your videos, keep up the good work, youre amazing, youre making a difference

kshitijmohan
ะะฒั‚ะพั€

Had developed an inclination to learn Python programming, wonderful explanation

viswanathan
ะะฒั‚ะพั€

I like you style.. it's really easy to follow and learn actively. Thanks for your work.

ammadkhan
ะะฒั‚ะพั€

Hi Sven, thanks for another informative tutorial. Your presentation skill is getting better and superb. Another idea for python excel tutorial "How to Merge Excel Files with Different Headers using Python". It's quite a common scenario in business.

GenNextAnalyst
ะะฒั‚ะพั€

Always have great content i love this chennel โค

sachindubey
ะะฒั‚ะพั€

Thanks a lot, this will save me a great deal of time as try to simplify large dataset files by replacing strings with numerical codes. But to do exactly that I need to make replacements in specific columns. Meaning I need to create multiple dictionaries for say column a=provinces column b=cities. Now each column has matching strings that have their respective different numerical codes. e.g. cordoba in province column needs to be replaced with 1 while cordoba in cities with 2. How can I use different dictionaries for different colums? I don't want to make you prepare a new tutorial video, but I'd appreciate it if you name the functions that I need to use. Thanks a million in advance.

firatealt
ะะฒั‚ะพั€

Terrific explanation. Had this working 10 minutes after watching the video. One question: Is there a way to perform the replacement on partial cell contents rather then complete cell?

patrickcoppinger
ะะฒั‚ะพั€

Very helpful and transparent, Sven, thanks a lot!

hemqnlp
ะะฒั‚ะพั€

Excelent video, there is some examples of find and delete any given string instead of replace?

raymundofelipeolvera
ะะฒั‚ะพั€

Quite useful. What i understood is this particular query is to replace the cell contents. Is there an option like if col A in your example has Government change col B to USA from Canada?

priyankamastakar
ะะฒั‚ะพั€

Your video is really helpful, please keep up the good work ๐Ÿ‘๐Ÿ‘๐Ÿ‘

ahmedsalah
ะะฒั‚ะพั€

Great!! Really well detailed and explained

Anarky
ะะฒั‚ะพั€

Thanks a lot, Sven! But I would like to ask how to solve the problem of Upper Case or Lower Case for the text in the Excel. For example, we find "Apple" but the code can not find the "APPLE" or "apple" right? So, how to replace them like we replace "Apple" fastly and easily.

ifkozyw
ะะฒั‚ะพั€

i want to ask if you can make a video of you using python to find and replace words in multiple files

ifoiwnvoinvoienrv
ะะฒั‚ะพั€

In one of folder ๐Ÿ“ there .sql files

I would like to change the database name based on input environment details

For example :
Input is ST
But code currently in Dev environment need to changed to ST
DEV -> ST

What are we doing here : I am doing the environmental Db changes into the SQLs



Which are functions we need to use ?

rahulrampally
ะะฒั‚ะพั€

Hai Can you help to find the difference of two excel sheet that have difference in rows and columns in multiple tabs ?

tpalexander
ะะฒั‚ะพั€

Which software you have used for highlighting the fields and arrows?

pankajjaswani