Skip to main content

Notifications

Community site session details

Community site session details

Session Id : l49mSoAHRv1dXLowKZ/vI/
Power Automate - Building Flows
Unanswered

(PAD) How to separate text by semicolon in Excel

Like (0) ShareShare
ReportReport
Posted on 12 Jun 2024 05:05:20 by 45

Hi everyone,

 

I am trying to make a following flow.

I would be grateful if you could give me some advice.

 

-FLOW-

1. Delete all the space

2. Separate text by semicolon into each cell


↓This is the result I would like to get

S140_0-1718168013409.png

  • Robby_WW Profile Picture
    115 on 12 Jun 2024 at 10:22:21
    Re: (PAD) How to separate text by semicolon in Excel

    Hey,

     

    The only way to automatically structure data like that would be with a "run script" (in Excel) action.

     

    function main(workbook: ExcelScript.Workbook) {
    
    	 // Variables
    	let selectedSheet = workbook.getActiveWorksheet();
    	let columnA = selectedSheet.getRange("A:A");
    	let lastrow = columnA.getUsedRange().getRowCount();
    	let range = "A1:A" + lastrow
    	
    	// Replace all " " with "" on column A on selectedSheet
    	columnA.replaceAll(" ", "", {completeMatch: false, matchCase: false});
    
    	// Text to columns on column A on selectedSheet
    	for (let row = 0; row < selectedSheet.getRange(range).getRowCount() ; row++) {
    		let sourceRange = selectedSheet.getRange(range);
    		let destinationRange = selectedSheet.getRange("A1");
    		let sourceRangeValues = sourceRange.getRow(row).getValues()[0][0].toString().split(/[;]/)
    		destinationRange.getOffsetRange(row, 0).getResizedRange(0, sourceRangeValues.length - 1).setValues([sourceRangeValues]);
    	}
    }

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - Building Flows

#1
David_MA Profile Picture

David_MA 292 Super User 2025 Season 1

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 247 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 212

Overall leaderboard
Loading started