cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
reginaldbal
Frequent Visitor

How to fill a range of cells in excel at once with one particular value?

[Power Automate Desktop] Without using a loop, how can I fill a range of cells in excel with one particular value?

 

1 ACCEPTED SOLUTION

Accepted Solutions
yasunm02
Solution Sage
Solution Sage

Hi @reginaldbal 
This sequence is not beautiful by any means but it works.
Suppose you want to fill A1 to A6 with value A:
1. 'Launch Excel' with a blank sheet
2. 'Write to Excel worksheet' write in A1 (row=1, column=1) the value A
3. 'Copy cells from Excel worksheet' copy cell A1 (row=1, column=1)
4. 'Select cells in Excel worksheet': select the remaining range you want to fill. In our example it's A2 to A6 (row=2, column=1 to row=6, column=1)
5. 'Focus window', class= XLMAIN (in order to use send keys properly)
6. 'Send keys' {LControlKey}({V}) (this sends Ctrl+V)

View solution in original post

1 REPLY 1
yasunm02
Solution Sage
Solution Sage

Hi @reginaldbal 
This sequence is not beautiful by any means but it works.
Suppose you want to fill A1 to A6 with value A:
1. 'Launch Excel' with a blank sheet
2. 'Write to Excel worksheet' write in A1 (row=1, column=1) the value A
3. 'Copy cells from Excel worksheet' copy cell A1 (row=1, column=1)
4. 'Select cells in Excel worksheet': select the remaining range you want to fill. In our example it's A2 to A6 (row=2, column=1 to row=6, column=1)
5. 'Focus window', class= XLMAIN (in order to use send keys properly)
6. 'Send keys' {LControlKey}({V}) (this sends Ctrl+V)

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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,710)