Find & Replace multiple words in Excel | REDUCE & SUBSTITUTE | Excel Off The Grid

  Рет қаралды 7,681

Excel Off The Grid

Excel Off The Grid

Күн бұрын

Пікірлер: 27
@petercompton538
@petercompton538 10 ай бұрын
This is great - good to see a practical use for REDUCE, which is not one of the easier Lambda functions to get one's head around!
@ExcelOffTheGrid
@ExcelOffTheGrid 9 ай бұрын
REDUCE is a tough one, hopefully we can find a few more use cases soon. 😁
@BilalKhan-et9jq
@BilalKhan-et9jq Ай бұрын
This is a great video. Really reduced my repetitive tasks
@Lanefasts
@Lanefasts 6 ай бұрын
Mark, this solution is perfect for my application because I have a long list of standard e-mail replies for my client's FAQ's. When I import a customer's information into the array, the generated replies include their specific name and order information. From there, all I have to do is copy/paste the generated text into my email reply instead of re-typing the same message over and over, and there are no worries of misspelling or entering a number incorrectly. MASSIVE time saver for me, the efficiency is off the charts. I was using nested SUBSTITUTE functions until now, but the formula has become too long and tedious to update, and feels like a bad workaround. I was looking for a cleaner and more dynamic formula, and the one you presented in this video is exactly what I've been looking for! Thank you!!!
@ExcelOffTheGrid
@ExcelOffTheGrid 5 ай бұрын
Great news. I’m glad I could help. 👍
@IvanCortinas_ES
@IvanCortinas_ES Жыл бұрын
Superb job as always Mark. Absolutely clear and bright. Thank you!!!
@ExcelOffTheGrid
@ExcelOffTheGrid Жыл бұрын
Glad you enjoyed it 😀
@serdip
@serdip Жыл бұрын
Thanks for posting another very interesting and practical tutorial in Excel. Since I started learning Power Query a scant three weeks ago, I am trying to use it in as many situations as possible.😃 I tried to replicate the functionality demonstrated in the video using PQ. I made a custom function that uses List.Accumulate() to make successive substitutions of the placeholders in the input string with the corresponding replacement values as listed in the table, conceptually mimicking (I think) the Excel REDUCE() function that you explained how to use. As I am far from proficient in PQ M code, my custom function is probably horribly inefficient and inelegantly composed, But, based on my very limited testing, it does seem to work. If nothing else, I had fun attempting to write some custom M code! Thank you kindly. ==================================================== // fxDynamicText() // Replace placeholders in input text, delimited by {, and }, // with values from the FindReplace table. (input as text) => let // From the FindReplace table, create a list of lists {, } // Have to case each element of Mapping as a list itself before using it in the // accumulator function. Mapping = Table.ToList(FindReplace, Combiner.CombineTextByDelimiter(",")), // Transform each element of Mapping into a list because initially each // element is just a text string with no structure. We require an indexed // sequence of items, so we can replace occurrences of the first element // with the value in the second element. Mapping_List = List.Transform(Mapping, each Text.Split(_, ",")), // The "seed" (2nd argument) is the original input string containing placeholders for // dynamic text substitution. Source = List.Accumulate(Mapping_List, input, (state, current) => Text.Replace(state, current{0}, current{1})) in Source My input string was: "My {sentence} has {placeholders} with {dynamic_content}. It is {month} {year} and I'm enjoying learning about {subject} on the {youtube channel} KZbin channel." My output string was: "My office has a computer with Excel 365. It is July 2023 and I'm enjoying learning about Power Query on the Excel Off The Grid KZbin channel." 😎
@ExcelOffTheGrid
@ExcelOffTheGrid Жыл бұрын
You stole my thunder... I've got a Power Query video with a List.Accumulate solution coming soon. It's not as tidy as yours, but a similar concept. If you're using List.Accumulate, then I think you're probably a pretty solid PQ user already.
@JohnWickXL
@JohnWickXL Жыл бұрын
This is great, thank you for sharing. Do you know if it's possible to replace the 'Offset' function within this formula? I try to avoid volatile functions where possible. I attempted to use 'Index' instead but that didn't work. I think there's no alternative but thought I'd ask!
@ExcelOffTheGrid
@ExcelOffTheGrid Жыл бұрын
I also tried with INDEX for the same reason. I couldn’t make it work either. If you find out, let me know.
@gnsarathbabu
@gnsarathbabu 3 ай бұрын
How can we do that in powerquery only if two columns are matching from two tables. Then find and replace only for those matching columns
@GumMice
@GumMice Жыл бұрын
This is really cool but I am struggling to find a practical example of when one would realistically use this. Any ideas?
@ExcelOffTheGrid
@ExcelOffTheGrid Жыл бұрын
Here are a few ideas: Standardizing a list of names (e.g. Wicks Ltd, Wick's Ltd and Wicks Ltd, can all be changed to just Wicks Ltd) - I've got a PQ video coming out with a similar solution soon. Building a complex sentences without a lot of concatenating for dynamic values Changing product descriptions - e.g. products were called "Premium Member", "Standard Member", "Economy Member" in the IT system, but the company now calls them "Diamond Member", "Platinum Member", "Standard Member" Cleaning special characters (e.g. changing "-", ":" and "!" for blank values) If you don't have to deal with text very often, then I agree. But if you do have to deal with text, then there are definitely uses.
@GumMice
@GumMice Жыл бұрын
@@ExcelOffTheGrid Amazing thanks!
@indianamathsman6444
@indianamathsman6444 Жыл бұрын
Watching the video inspired to play with different functions. I've just used this function to replicate the countif function where two things needed to be true. The offset was used in a nested if statement to check the value of a cell in the row above: =REDUCE(0,ProjectCompCodes,LAMBDA(a,v,IF(v=HI6,IF(OFFSET(v,-1,0)=I6,a+1,a),a))) 0 is the starting value that accumulates ProjectCompCodes is just the name of a row of cells i.e. the array HI6 and I6 were just the values I needed to be true to count on if the value v in the array met the criteria and the value in the cell above v met the criteria. Similarly, you could replicate vlookup to call multiple values in a row using offset without using vlookup multiple times. Whether that is quicker/desirable I'm not knowledgeable enough to say, but this may be a starting point for considering what you might be able to accomplish. I also used the concat function to concatenate all the values in a list using this method. This is simpler than other methods I have employed.
@ExcelOffTheGrid
@ExcelOffTheGrid Жыл бұрын
@@indianamathsman6444 Good work. Great skills 👍
@Lanefasts
@Lanefasts 6 ай бұрын
This is perfect for my application because I have a long list of standard e-mail replies for my client's FAQ's. When I import a customer's information into the array, the generated replies now include their specific name and order information with zero spelling errors. From there, all I have to do is copy/paste the generated text into my email reply instead of re-typing the same message over and over, and there are no worries of misspelling or entering a number incorrectly. MASSIVE time saver for me, the efficiency is off the charts. I was using nested SUBSTITUTE functions until now, but the formula has become too long and tedious to update, and feels like a bad workaround. I was looking for a cleaner and more dynamic formula, and the one presented in this video is exactly what I've been looking for!
@PANDHARI_BOSS_CYDA
@PANDHARI_BOSS_CYDA 3 ай бұрын
THX A LOT
@AxelDarioMusic
@AxelDarioMusic 11 ай бұрын
it gives the "#value!" error . Any idea why ? I have replicated exactly your table . my office version : 16.78 . Microsoft 360
@ExcelOffTheGrid
@ExcelOffTheGrid 11 ай бұрын
#VALUE! Is Excel’s way of telling you there is an issue with the values in the formula e.g using a date function on a text value. Without looking at I can’t say exactly.
@crispexcel
@crispexcel Жыл бұрын
Interesting!
@ExcelOffTheGrid
@ExcelOffTheGrid Жыл бұрын
Thanks 😀
@thebhaskarjoshi
@thebhaskarjoshi Жыл бұрын
Can we find your courses on Udemy?
@ExcelOffTheGrid
@ExcelOffTheGrid Жыл бұрын
We host our own courses on our own platform. You can find out information here: exceloffthegrid.com/courses/
@williamarthur4801
@williamarthur4801 8 ай бұрын
That was really cleaver, it's quite hard to break down and visualize the gradual accumulation.
@ExcelOffTheGrid
@ExcelOffTheGrid 8 ай бұрын
Thank you. Yes, these new LAMBDA helper functions can be quite tricky.
Use slicers with PIVOTBY, GROUPBY & FILTER in Excel | Excel Off The Grid
8:07
Multiple Find / Replace with List.Accumulate() ~ Power Query
19:24
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 98 МЛН
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 22 МЛН
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
HOOOTDOGS
Рет қаралды 3 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 269 #shorts
00:26
6 Advanced Find and Replace Tricks 🔎 Plus a Bonus Trick
12:09
Computergaga
Рет қаралды 9 М.
Ultimate XLOOKUP Guide: 10 Tips You Need to Know!
13:14
Excel Off The Grid
Рет қаралды 9 М.
Power Query: Bulk Replace Values from a table in Excel & Power BI
12:17
Next level FILTER Function tricks | Excel Off The Grid
13:23
Excel Off The Grid
Рет қаралды 27 М.
4 METHODS to Filter by a List in Power Query | Excel Off The Grid
13:14
Excel Off The Grid
Рет қаралды 37 М.
Using slicers with formulas (2022 update) | Excel Off The Grid
9:50
Excel Off The Grid
Рет қаралды 47 М.
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 98 МЛН