• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Format a Vehical no .

It's working ... How to reflect formulas result on same cell when pressing enter and also how to use this formula on entire column?
 
The second part of the question requires copy down or an array reference rather than a cell reference
Code:
= UPPER(
      LEFT(rawdata,4)
         & "-"
         & MID(rawdata,5,2)
         & "-"
         & RIGHT(rawdata,4)
   )
which will spill to return the entire range of results using modern Excel (365 or 2021) but requires CSE for legacy systems.
As for changing the result in the same cell, that violates the principles of functional programming and is not supported.
If you wish to use VBA, being procedural code, that can overwrite the input data but care is needed to avoid an endless loop of changing the same cells.
 
This is my first go at Power Query
Please let me know what can be done better

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Uppercased Text" = Table.TransformColumns(#"Changed Type",{{"Column1", Text.Upper, type text}}),
#"Split Column by Position" = Table.SplitColumn(#"Uppercased Text", "Column1", Splitter.SplitTextByPositions({0, 4}, false), {"Column1.1", "Column1.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Position",{{"Column1.1", type text}, {"Column1.2", type text}}),
#"Split Column by Position1" = Table.SplitColumn(#"Changed Type1", "Column1.2", Splitter.SplitTextByPositions({0, 4}, true), {"Column1.2.1", "Column1.2.2"}),
#"Merged Columns" = Table.CombineColumns(#"Split Column by Position1",{"Column1.1", "Column1.2.1", "Column1.2.2"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"Merged")
in
#"Merged Columns"
 
Back
Top