cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alan7lp
New Member

Split data into different sheets excel

Hello!

I created a survey using Forms where I have a flow that fills in the answers to a Excel file saved in SharePoint.

 

My question is, would it be possible that based on a selected option in one of the questions in Forms, the data fills different tables allocated in a corresponding tab within the same Excel file?

Question 1: Select A, B or C

If I select A, fill all the information to XL FILE Sheet A.

If I select B, fill all the information to SAME XL FILE but Sheet B.

And so on.

 

Please, let me know if this is possible.

Thanks in advance,

Alan.

1 ACCEPTED SOLUTION

Accepted Solutions
Mister_Shaik
Solution Sage
Solution Sage

Yes, you absolutely can. Once you click on the section you just highlighted, you can click add new action and add the switch action.

 

1. Add a new action 

2. add.PNG

2. Add the switch statement

 

switch.PNG

3. Add the On data from the output of the question which selects the sheet

4..PNG

4. Use the Case Equals to match the answer for question and what table to add data into, based on choice match

1. save to different tables.PNG

 

Kind Regards,

Shaik Sha
________________________________________________________________________

If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Mister_Shaik
Solution Sage
Solution Sage

Hi @alan7lp 

 

If you have 3 different sheets, that means you already have 3 tables, 1 in each sheet, to store the data. 

 

Then why don't you write a switch statement to add data to a particular table, based on the selection of user? This would move the data to different sheets as you've wanted.

 

1. save to different tables.PNG

 

Above, I've used a sample flow and it works exactly as you wanted.

 

Hope you find this helpful 🙂

 

Kind Regards,

Shaik Sha
________________________________________________________________________

If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Mister_Shaik !

That would work wonders. I am just quite new to Power Automate though. Would you mind show me how to create the part of the flow for the switch statement, please ?

My current flow looks like this:

alan7lp_0-1643294779163.png

I guess the switch function might go there where I marked it? In any case, if you don't mind to explain me more on that I will truly appreciate it 🙂


Thank yoU!

Mister_Shaik
Solution Sage
Solution Sage

Yes, you absolutely can. Once you click on the section you just highlighted, you can click add new action and add the switch action.

 

1. Add a new action 

2. add.PNG

2. Add the switch statement

 

switch.PNG

3. Add the On data from the output of the question which selects the sheet

4..PNG

4. Use the Case Equals to match the answer for question and what table to add data into, based on choice match

1. save to different tables.PNG

 

Kind Regards,

Shaik Sha
________________________________________________________________________

If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Great!

It works perfectly 🙂

Thanks for the support Mister!

Have a nice day !

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,464)